Skip to content

Commit

Permalink
refactor(possible errors): Update rules for Prettier integration
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Requires min eslint version of 4.x.

BREAKING CHANGE: Multiple rules disabled and handled by Prettier, this will change code style for defaults based projects.

Upgrade: After upgrading with defaults, any editor Prettier plugin can be used to update style. The pre-commit hook will also fix & write the prettier changes.
  • Loading branch information
joshwiens committed Dec 14, 2017
1 parent 2798140 commit c95baae
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rules/possible-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ module.exports = {

// disallow unnecessary parentheses
// http://eslint.org/docs/rules/no-extra-parens
'no-extra-parens': ['off', 'all', {
conditionalAssign: true,
nestedBinaryExpressions: false,
returnAssign: false,
}],
// This is handled by Prettier in Defaults 2.0
'no-extra-parens': 'off',

// disallow unnecessary semicolons
// http://eslint.org/docs/rules/no-extra-semi
'no-extra-semi': 'error',
// This is handled by Prettier in Defaults 2.0
'no-extra-semi': 'off',

// disallow reassigning function declarations
// http://eslint.org/docs/rules/no-func-assign
Expand Down Expand Up @@ -102,7 +100,8 @@ module.exports = {

// disallow confusing multiline expressions
// http://eslint.org/docs/rules/no-unexpected-multiline
'no-unexpected-multiline': 'error',
// This is handled by Prettier in Defaults 2.0
'no-unexpected-multiline': 'off',

// disallow unreachable code after return, throw, continue, and break statements
// http://eslint.org/docs/rules/no-unreachable
Expand Down

0 comments on commit c95baae

Please sign in to comment.