Skip to content

Commit

Permalink
Add logical-assignment-operators rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Sep 24, 2022
1 parent 7fde609 commit aacde5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ module.exports = {
exceptAfterSingleLine: true,
},
],
'logical-assignment-operators': [
'error',
'always',
{
enforceForIfStatements: true,
},
],
'max-depth': 'warn',
'max-nested-callbacks': [
'warn',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
},
"devDependencies": {
"ava": "^2.4.0",
"eslint": "^8.14.0",
"eslint": "^8.24.0",
"is-plain-obj": "^3.0.0"
},
"peerDependencies": {
"eslint": ">=8.14.0"
"eslint": ">=8.24.0"
}
}

0 comments on commit aacde5a

Please sign in to comment.