mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 22:08:08 -05:00
[eslint config] [base] Enables eslint rule for operator-linebreak
Requiring operators at the beginning of the line makes code more readable. When operators are on the left hand side they mirror the syntax of method chaining and it is easy to see the build of logic in a statement.
This commit is contained in:
@@ -374,8 +374,9 @@ module.exports = {
|
||||
// http://eslint.org/docs/rules/operator-assignment
|
||||
'operator-assignment': ['error', 'always'],
|
||||
|
||||
// enforce operators to be placed before or after line breaks
|
||||
'operator-linebreak': 'off',
|
||||
// Requires operator at the beginning of the line in multiline statements
|
||||
// https://eslint.org/docs/rules/operator-linebreak
|
||||
'operator-linebreak': ['error', 'before'],
|
||||
|
||||
// disallow padding within blocks
|
||||
'padded-blocks': ['error', { blocks: 'never', classes: 'never', switches: 'never' }],
|
||||
|
||||
Reference in New Issue
Block a user