mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 16:47:55 -05:00
10
README.md
10
README.md
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user