[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:
Sharmila
2017-10-18 11:42:26 -07:00
parent cf9e17efee
commit 6e1f11185d

View File

@@ -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' }],