{"_id":"eslint-plugin-brackets","_rev":"9-8e69c6966d8fbbc56e8d805a14c9aa58","name":"eslint-plugin-brackets","description":"ESLint style rules for minimizing diffs with line breaks around brackets","dist-tags":{"latest":"0.1.3"},"versions":{"0.0.1":{"name":"eslint-plugin-brackets","version":"0.0.1","description":"ESLint style rules for minimizing diffs with line breaks around brackets","main":"dist/index.js","scripts":{"build":"rimraf dist && babel lib -d dist","lint":"eslint .","lint:watch":"esw -w","prepublish":"npm run build && npm test","start":"npm run watch","test":"jest","test:ci":"npm run lint && npm run test","test:watch":"jest --watch","watch":"npm run build -- --watch"},"repository":{"type":"git","url":"git+https://github.com/kentor/eslint-plugin-brackets.git"},"author":{"name":"Kenneth Chung","email":"ken70r@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/kentor/eslint-plugin-brackets/issues"},"files":["dist/index.js","dist/rules/*.js","dist/utils.js"],"homepage":"https://github.com/kentor/eslint-plugin-brackets","keywords":["brackets","eslint","eslint-plugin","eslint-plugin-sort","eslintplugin","require","styling"],"devDependencies":{"babel-cli":"^6.18.0","babel-plugin-transform-object-rest-spread":"^6.16.0","babel-preset-es2015-node4":"^2.1.0","eslint":"^3.10.2","eslint-config-kentor":"^3.9.1","eslint-watch":"^2.1.14","jest":"^17.0.3","rimraf":"^2.5.4"},"dependencies":{"lodash":"^4.17.2"},"jest":{"testRegex":"<rootDir>/dist/.*__tests__/.*\\.js$"},"gitHead":"1341413b0b104e4c30589d6b5a70eb6067b14608","_id":"eslint-plugin-brackets@0.0.1","_shasum":"5c4b7b6efa01ecc36da6293ed41784a80311d0ca","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"kentor","email":"ken70r@gmail.com"},"dist":{"shasum":"5c4b7b6efa01ecc36da6293ed41784a80311d0ca","tarball":"https://registry.npmjs.org/eslint-plugin-brackets/-/eslint-plugin-brackets-0.0.1.tgz","integrity":"sha512-vJd2dS/w4GtV2lijN9ymodTIsU6+lrCyGVyupIc1hekL2B5uvx0WRZmI3ZNn9gcXNWvr5IBGovmztQBlQmtJew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDUljVV2BPo4xe7UMKx5Ysd2RYp2oxVXl1V1gu7QTQqHAiEAi7cvGuU3r8+NETO8JwrS+MPopmZ7E/6lDaQkOPXzIQg="}]},"maintainers":[{"name":"kentor","email":"ken70r@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/eslint-plugin-brackets-0.0.1.tgz_1479450003825_0.6378698877524585"}},"0.1.0":{"name":"eslint-plugin-brackets","version":"0.1.0","description":"ESLint style rules for minimizing diffs with line breaks around brackets","main":"lib/index.js","scripts":{"build":"npm run clean && babel lib -d dist","clean":"rimraf coverage dist","lint":"eslint .","lint:watch":"esw -w","publish":"npm run test:ci && npm publish","test":"jest --config=jest-dev.json","test:ci":"npm run lint && npm run build && npm run test:dist && npm run test -- --coverage && codecov","test:dist":"jest --config=jest-dist.json","test:watch":"npm run test -- --watch"},"repository":{"type":"git","url":"git+https://github.com/kentor/eslint-plugin-brackets.git"},"author":{"name":"Kenneth Chung","email":"ken70r@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/kentor/eslint-plugin-brackets/issues"},"files":["dist/index.js","dist/rules/*.js","dist/utils.js"],"homepage":"https://github.com/kentor/eslint-plugin-brackets","keywords":["brackets","eslint","eslint-plugin","eslint-plugin-sort","eslintplugin","require","styling"],"devDependencies":{"babel-cli":"^6.18.0","babel-jest":"^17.0.2","babel-plugin-transform-object-rest-spread":"^6.16.0","babel-preset-es2015-node4":"^2.1.0","codecov":"^1.0.1","eslint":"^3.10.2","eslint-config-kentor":"^3.9.1","eslint-watch":"^2.1.14","jest":"^17.0.3","rimraf":"^2.5.4"},"dependencies":{"lodash":"^4.17.2"},"gitHead":"babf91e73e23990f5f886de3589ac9f6f91190dd","_id":"eslint-plugin-brackets@0.1.0","_shasum":"8ffeb1d28ec9d5bc9553635832b1dcc4d9ce1026","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"pzuraq","email":"cmg@pzuraq.co"},"dist":{"shasum":"8ffeb1d28ec9d5bc9553635832b1dcc4d9ce1026","tarball":"https://registry.npmjs.org/eslint-plugin-brackets/-/eslint-plugin-brackets-0.1.0.tgz","integrity":"sha512-8NvZGOug7O+pD6t8XNtCUBkd0bw0VxWCVMMyk7TIFnHeD7CkxVfCc6IA/lb3Hs7tUK5XYJjvK9nleJbGQbnDXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLUYbp03B+z7iluHouM6NvYq9HLJBYWNYTYIZKsAF6WQIgXQSwVwmDpq/Z9OONjlmJz1VPMAmvcUDJXgOeVu+1Ydc="}]},"maintainers":[{"email":"cmg@pzuraq.co","name":"pzuraq"},{"email":"ken70r@gmail.com","name":"kentor"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-brackets-0.1.0.tgz_1505858115648_0.28368577803485096"}},"0.1.1":{"name":"eslint-plugin-brackets","version":"0.1.1","description":"ESLint style rules for minimizing diffs with line breaks around brackets","main":"lib/index.js","scripts":{"build":"npm run clean && babel lib -d dist","clean":"rimraf coverage dist","lint":"eslint .","lint:watch":"esw -w","publish":"npm run build && npm publish","test":"jest --config=jest-dev.json","test:ci":"npm run lint && npm run build && npm run test:dist && npm run test -- --coverage && codecov","test:dist":"jest --config=jest-dist.json","test:watch":"npm run test -- --watch"},"repository":{"type":"git","url":"git+https://github.com/kentor/eslint-plugin-brackets.git"},"author":{"name":"Kenneth Chung","email":"ken70r@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/kentor/eslint-plugin-brackets/issues"},"files":["dist/index.js","dist/rules/*.js","dist/utils.js"],"homepage":"https://github.com/kentor/eslint-plugin-brackets","keywords":["brackets","eslint","eslint-plugin","eslint-plugin-sort","eslintplugin","require","styling"],"devDependencies":{"babel-cli":"^6.18.0","babel-jest":"^17.0.2","babel-plugin-transform-object-rest-spread":"^6.16.0","babel-preset-es2015-node4":"^2.1.0","codecov":"^1.0.1","eslint":"^3.10.2","eslint-config-kentor":"^3.9.1","eslint-watch":"^2.1.14","jest":"^17.0.3","rimraf":"^2.5.4"},"dependencies":{"lodash":"^4.17.2"},"gitHead":"7e537575d91a41e42bc8c78890515620d398db19","_id":"eslint-plugin-brackets@0.1.1","_shasum":"e200fab3c4ce71764c379d6d34384a20a9c6d6c1","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"pzuraq","email":"cmg@pzuraq.co"},"dist":{"shasum":"e200fab3c4ce71764c379d6d34384a20a9c6d6c1","tarball":"https://registry.npmjs.org/eslint-plugin-brackets/-/eslint-plugin-brackets-0.1.1.tgz","integrity":"sha512-zt0X54IRurwdKdmBpv9FDvkk1mw1056dkC01FC8SAsaJNzddDY8ukvkDEGYfrPI5UBp45q7B/XhsTO00SGmB1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHk4BYPL8znhmaDhx6xhWWNbaEPdZYDLKjlKmM5UQ1JyAiEA0KlNi5H3K60KHvoIPhXrEiGD0apCJqxZAeB1EsmuQds="}]},"maintainers":[{"email":"cmg@pzuraq.co","name":"pzuraq"},{"email":"ken70r@gmail.com","name":"kentor"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-brackets-0.1.1.tgz_1506449449714_0.10938082542270422"}},"0.1.2":{"name":"eslint-plugin-brackets","version":"0.1.2","description":"ESLint style rules for minimizing diffs with line breaks around brackets","main":"dist/index.js","scripts":{"build":"npm run clean && babel lib -d dist","clean":"rimraf coverage dist","lint":"eslint .","lint:watch":"esw -w","prepublish":"npm run build","test":"jest --config=jest-dev.json","test:ci":"npm run lint && npm run build && npm run test:dist && npm run test -- --coverage && codecov","test:dist":"jest --config=jest-dist.json","test:watch":"npm run test -- --watch"},"repository":{"type":"git","url":"git+https://github.com/kentor/eslint-plugin-brackets.git"},"author":{"name":"Kenneth Chung","email":"ken70r@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/kentor/eslint-plugin-brackets/issues"},"files":["dist/index.js","dist/rules/*.js","dist/utils.js"],"homepage":"https://github.com/kentor/eslint-plugin-brackets","keywords":["brackets","eslint","eslint-plugin","eslint-plugin-sort","eslintplugin","require","styling"],"devDependencies":{"babel-cli":"^6.18.0","babel-jest":"^17.0.2","babel-plugin-transform-object-rest-spread":"^6.16.0","babel-preset-es2015-node4":"^2.1.0","codecov":"^1.0.1","eslint":"^3.10.2","eslint-config-kentor":"^3.9.1","eslint-watch":"^2.1.14","jest":"^17.0.3","rimraf":"^2.5.4"},"dependencies":{"lodash":"^4.17.2"},"gitHead":"83b8b1587cc2c04fb60a5b8ea14315041dcc8a76","_id":"eslint-plugin-brackets@0.1.2","_shasum":"5b8eebb4bcc833ed1855ba1d0ab3b25662d642bc","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"pzuraq","email":"cmg@pzuraq.co"},"dist":{"shasum":"5b8eebb4bcc833ed1855ba1d0ab3b25662d642bc","tarball":"https://registry.npmjs.org/eslint-plugin-brackets/-/eslint-plugin-brackets-0.1.2.tgz","integrity":"sha512-DQY3qulC2zcrmEupcWBvtYPxggoRXLZ8/vq/PP7D21bF5SVntukhMAT40M/AYQzD8GUmmJdIz/fc2oO3NYY87w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOctZb5K3BKk8E6OKLXFc0WNEc/c0yU4Pqzz1i+v6TaQIgdLj4J3boTbxgedNDiH54PIma3Clda8Bq41eYYvnO6ro="}]},"maintainers":[{"email":"cmg@pzuraq.co","name":"pzuraq"},{"email":"ken70r@gmail.com","name":"kentor"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-brackets-0.1.2.tgz_1506450746258_0.8919298611581326"}},"0.1.3":{"name":"eslint-plugin-brackets","version":"0.1.3","description":"ESLint style rules for minimizing diffs with line breaks around brackets","main":"dist/index.js","scripts":{"build":"npm run clean && babel lib -d dist","clean":"rimraf coverage dist","lint":"eslint .","lint:watch":"esw -w","prepublish":"npm run build","test":"jest --config=jest-dev.json","test:ci":"npm run lint && npm run build && npm run test:dist && npm run test -- --coverage && codecov","test:dist":"jest --config=jest-dist.json","test:watch":"npm run test -- --watch"},"repository":{"type":"git","url":"git+https://github.com/kentor/eslint-plugin-brackets.git"},"author":{"name":"Kenneth Chung","email":"ken70r@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/kentor/eslint-plugin-brackets/issues"},"files":["dist/index.js","dist/rules/*.js","dist/utils.js"],"homepage":"https://github.com/kentor/eslint-plugin-brackets","keywords":["brackets","eslint","eslint-plugin","eslint-plugin-sort","eslintplugin","require","styling"],"devDependencies":{"babel-cli":"^6.18.0","babel-jest":"^17.0.2","babel-plugin-transform-object-rest-spread":"^6.16.0","babel-preset-es2015-node4":"^2.1.0","codecov":"^1.0.1","eslint":"^3.10.2","eslint-config-kentor":"^3.9.1","eslint-watch":"^2.1.14","jest":"^17.0.3","rimraf":"^2.5.4"},"dependencies":{"lodash":"^4.17.2"},"gitHead":"a55d0cb4ca39a8e28516ac5aef545b54b8963704","_id":"eslint-plugin-brackets@0.1.3","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"pzuraq","email":"cmg@pzuraq.co"},"dist":{"integrity":"sha512-YusXQpZq4tJZTrJLvf80T3lyif00aFonGirtl4kbJU/+Wvu/KICCHsx0B3ZQNCuURz9bG2UVhcGpwNoo0tKyXA==","shasum":"60a9f7a9a4465a4ec7d804bd80f32dab1b6a2049","tarball":"https://registry.npmjs.org/eslint-plugin-brackets/-/eslint-plugin-brackets-0.1.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGo5YdExPjIA0Uu5UcNG2n9/e2qGbQt1TQkPCZWD3oUMAiEA67Xk+V35Clp7cFChH/2Zk2kUA+iBU4BV4mXIuWd6/Ig="}]},"maintainers":[{"email":"cmg@pzuraq.co","name":"pzuraq"},{"email":"ken70r@gmail.com","name":"kentor"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-brackets-0.1.3.tgz_1510191565589_0.8724823612719774"}}},"readme":"# eslint-plugin-brackets\n\n[![Build Status](https://travis-ci.org/kentor/eslint-plugin-brackets.svg)](https://travis-ci.org/kentor/eslint-plugin-brackets) [![codecov](https://codecov.io/gh/kentor/eslint-plugin-brackets/branch/master/graph/badge.svg)](https://codecov.io/gh/kentor/eslint-plugin-brackets) [![npm](https://img.shields.io/npm/v/eslint-plugin-brackets.svg)](https://www.npmjs.com/package/eslint-plugin-brackets)\n\nOpinionated ESLint style rules dealing with line breaks after opening\nbrackets and before closing brackets of objects, arrays, conditionals, and\nfunctions.\n\n## Overview\n\nThis project is opinionated, meaning there are no options for any of the rules.\nHowever, this may change in the future.\n\nThe general goal of these rules is to enforce a coding style that minimizes\ndiffs when items are added to lists (be it arrays, objects, parameter lists,\netc.)\n\nFor example, we want to avoid this:\n\n```js\n// Bad\n\narray = ['a',\n         'b',\n         'c'];\n\narray2 = [\"this is a long string\" +\n          \"spanning multiple lines\"];\n\nobject = { a: 'a',\n           b: 'b' };\n\nfunction foo(bar,\n             baz) {\n}\n\ncall('a',\n     'b');\n\nif (test &&\n    test2 &&\n    test3) {\n}\n```\n\nAnd instead prefer this:\n\n```js\n// Good\n\narray = [\n  'a',\n  'b',\n  'c',\n];\n\narray2 = [\n  \"this is a long string\" +\n  \"spanning multiple lines\"\n];\n\nobject = {\n  a: 'a',\n  b: 'b'\n};\n\nfunction foo(\n  bar,\n  baz\n) {\n}\n\ncall(\n  'a',\n  'b'\n);\n\nif (\n  test &&\n  test2 &&\n  test3\n) {\n}\n```\n\nWhy?\n\n- Adding an item to the top of the list or to the bottom of the list will afford\n  smaller diffs.\n- Changing the name of the assigned variable/callee won't require shifting every\n  other item in the list to fix indentation.\n- There's an argument for symmetry somewhere.\n\nIn other words, there shouldn't be items on the same line as the opening bracket\nor closing bracket enclosing the list if the list spans multiple line.\n\n**However**, there is an exception to this: if the last token of the line\ncontaining the opening bracket is another opening bracket, or if the first token\nof the line containing the closing bracket is another closing bracket, then that\nis allowed:\n\n```js\n// Fine\n\narray = ['a', function() { // ends with an opening bracket\n}];\n\ncall('a', {\n  b: 'c',\n});\n\nif (confirm(\n  'are you sure?'\n)) {\n}\n```\n\nThe exception to _that_ is it's not allowed for objects:\n\n```js\n// Bad\n\nobj = { a: 'b', c: {\n  d: 'e',\n} };\n```\n\nPreferring this:\n```js\n// Good\n\nobj = {\n  a: 'b',\n  c: {\n    d: 'e',\n  },\n};\n```\n\n## Note on auto-fixing\n\nAll rules can be auto-fixed (running eslint with `--fix`). The fix will add\nappropriate line breaks after the opening bracket and before the closing bracket\nat violation sites. This may produce code with bad indentation. We rely on\neslint's `indent` rule to fix the indentation in a second pass.\n\nCurrently (as of ESLint 3.10) the `indent` rule is broken for params inside call\nexpressions and expressions inside conditionals, but this should be fixed soon.\n\n## List of rules\n\n- brackets/array-bracket-newline\n- brackets/call-parens-newline\n- brackets/conditional-parens-newline\n- brackets/func-parens-newline\n- brackets/object-curly-newline\n\nTake a look at the [rule tests](lib/rules/__tests__) to see valid and invalid\npatterns for each rule.\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\n$ npm install eslint\n```\n\nNext, install `eslint-plugin-brackets`:\n\n```\n$ npm install eslint-plugin-brackets\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must\nalso install `eslint-plugin-brackets` globally.\n\n## Usage\n\nAdd `brackets` to the plugins section of your `.eslintrc` configuration\nfile. You can omit the `eslint-plugin-` prefix:\n\n```json\n{\n  \"plugins\": [\n    \"brackets\"\n  ]\n}\n```\n\nThen configure the rules you want to use under the rules section.\n\n```json\n{\n  \"rules\": {\n    \"brackets/array-bracket-newline\": 2,\n    \"brackets/object-curly-newline\": 2,\n  }\n}\n```\n\n## Development\n\n- Install packages with `npm install` or `yarn`.\n- Run `npm run test:watch` to continually run the tests\n\n## License\n\n[MIT](LICENSE.txt)\n","maintainers":[{"email":"cmg@pzuraq.co","name":"pzuraq"},{"email":"ken70r@gmail.com","name":"kentor"}],"time":{"modified":"2022-06-17T20:27:45.277Z","created":"2016-11-18T06:20:04.059Z","0.0.1":"2016-11-18T06:20:04.059Z","0.1.0":"2017-09-19T21:55:16.618Z","0.1.1":"2017-09-26T18:10:49.802Z","0.1.2":"2017-09-26T18:32:26.390Z","0.1.3":"2017-11-09T01:39:25.653Z"},"homepage":"https://github.com/kentor/eslint-plugin-brackets","keywords":["brackets","eslint","eslint-plugin","eslint-plugin-sort","eslintplugin","require","styling"],"repository":{"type":"git","url":"git+https://github.com/kentor/eslint-plugin-brackets.git"},"author":{"name":"Kenneth Chung","email":"ken70r@gmail.com"},"bugs":{"url":"https://github.com/kentor/eslint-plugin-brackets/issues"},"license":"MIT","readmeFilename":"README.md"}