mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 21:38:03 -05:00
[eslint config] [base] [breaking] Enables nonblock-statement-body-position rule and adds link to guide
This commit is contained in:
@@ -1981,7 +1981,7 @@ Other Style Guides
|
||||
## Blocks
|
||||
|
||||
<a name="blocks--braces"></a><a name="16.1"></a>
|
||||
- [16.1](#blocks--braces) Use braces with all multi-line blocks.
|
||||
- [16.1](#blocks--braces) Use braces with all multi-line blocks. eslint: [`nonblock-statement-body-position`](https://eslint.org/docs/rules/nonblock-statement-body-position)
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
|
||||
@@ -354,7 +354,7 @@ module.exports = {
|
||||
|
||||
// enforce the location of single-line statements
|
||||
// http://eslint.org/docs/rules/nonblock-statement-body-position
|
||||
'nonblock-statement-body-position': 'off',
|
||||
'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }],
|
||||
|
||||
// require padding inside curly braces
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
|
||||
Reference in New Issue
Block a user