Skip to content

Commit

Permalink
feat(js): additional js rules
Browse files Browse the repository at this point in the history
BREAKING CHANGE: no-lonely-if errors
BREAKING CHANGE: no-return-assign, errors
BREAKING CHANGE: prefer-object-spread, errors
BREAKING CHANGE: no-bitwise, errors
  • Loading branch information
JAdshead committed Jul 16, 2020
1 parent 846bbf7 commit 58df834
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ module.exports = {
rules: {
// open a PR per rule change

// Simplifies code and reduces bugs
// https://eslint.org/docs/rules/no-lonely-if
'no-lonely-if': ['error'],

// Reduces careless typo mistakes
// https://eslint.org/docs/rules/no-return-assign
'no-return-assign': ['error'],

// Spreading is better than complex Object.assign
// https://eslint.org/docs/rules/prefer-object-spread
'prefer-object-spread': ['error'],

// This catches typos that end up being bitwise operators
// https://eslint.org/docs/rules/no-bitwise
'no-bitwise': ['error'],

// https://github.com/facebook/jsx/issues/23
// The future is that props given with no value will work like object shorthand
// notation instead of evaluating to true.
Expand Down

0 comments on commit 58df834

Please sign in to comment.