mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 05:08:25 -05:00
[eslint-v2][whitespace] add no-whitespace-before-property rule
This commit is contained in:
committed by
Jordan Harband
parent
92df6357b3
commit
e6cbcf4cc5
@@ -1679,7 +1679,7 @@ Other Style Guides
|
||||
```
|
||||
|
||||
- [18.6](#18.6) <a name='18.6'></a> Use indentation when making long method chains (more than 2 method chains). Use a leading dot, which
|
||||
emphasizes that the line is a method call, not a new statement. eslint: [newline-per-chained-call](http://eslint.org/docs/rules/newline-per-chained-call)
|
||||
emphasizes that the line is a method call, not a new statement. eslint: [newline-per-chained-call](http://eslint.org/docs/rules/newline-per-chained-call) [no-whitespace-before-property](http://eslint.org/docs/rules/no-whitespace-before-property)
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
|
||||
@@ -90,6 +90,9 @@ module.exports = {
|
||||
// also, prefer `a || b` over `a ? a : b`
|
||||
// http://eslint.org/docs/rules/no-unneeded-ternary
|
||||
'no-unneeded-ternary': [2, { 'defaultAssignment': false }],
|
||||
// disallow whitespace before properties
|
||||
// http://eslint.org/docs/rules/no-whitespace-before-property
|
||||
'no-whitespace-before-property': 2,
|
||||
// require padding inside curly braces
|
||||
'object-curly-spacing': [2, 'always'],
|
||||
// allow just one var statement per function
|
||||
|
||||
Reference in New Issue
Block a user