File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
packages/eslint-config-airbnb/rules Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -1575,6 +1575,18 @@ Other Style Guides
15751575 }
15761576 ` ` `
15771577
1578+ - [18.10](#18.10) <a name='18.10'></a> Do not add spaces inside brackets.
1579+
1580+ ` ` ` javascript
1581+ // bad
1582+ const foo = [ 1 , 2 , 3 ];
1583+ console .log (foo[ 0 ]);
1584+
1585+ // good
1586+ const foo = [1 , 2 , 3 ];
1587+ console .log (foo[0 ]);
1588+ ` ` `
1589+
15781590**[⬆ back to top](#table-of-contents)**
15791591
15801592## Commas
Original file line number Diff line number Diff line change 11module . exports = {
22 'rules' : {
33 // enforce spacing inside array brackets
4- 'array-bracket-spacing' : 0 ,
4+ 'array-bracket-spacing' : [ 2 , 'never' ] ,
55 // enforce one true brace style
66 'brace-style' : [ 2 , '1tbs' , { 'allowSingleLine' : true } ] ,
77 // require camel case names
@@ -10,8 +10,8 @@ module.exports = {
1010 'comma-spacing' : [ 2 , { 'before' : false , 'after' : true } ] ,
1111 // enforce one true comma style
1212 'comma-style' : [ 2 , 'last' ] ,
13- // require or disallow padding inside computed properties
14- 'computed-property-spacing' : 0 ,
13+ // disallow padding inside computed properties
14+ 'computed-property-spacing' : [ 2 , 'never' ] ,
1515 // enforces consistent naming when capturing the current execution context
1616 'consistent-this' : 0 ,
1717 // enforce newline at the end of file, with no multiple empty lines
You can’t perform that action at this time.
0 commit comments