Skip to content

Commit

Permalink
Add Section 18.11 - Add spaces inside curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
pigoz authored and jaylaw81 committed Sep 19, 2017
1 parent 4fda48c commit a924247
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,16 @@ Other Style Guides
console.log(foo[0]);
```
- [18.11](#18.11) <a name='18.11'></a> Add spaces inside curly braces.
```javascript
// bad
const foo = {clark: 'kent'};

// good
const foo = { clark: 'kent' };
```
**[⬆ back to top](#table-of-contents)**
## Commas
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-airbnb/rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ module.exports = {
'no-underscore-dangle': 0,
// disallow the use of Boolean literals in conditional expressions
'no-unneeded-ternary': 0,
// require or disallow padding inside curly braces
'object-curly-spacing': 0,
// require padding inside curly braces
'object-curly-spacing': [2, 'always'],
// allow just one var statement per function
'one-var': [2, 'never'],
// require assignment operator shorthand where possible or prohibit it entirely
Expand Down

0 comments on commit a924247

Please sign in to comment.