Skip to content

Commit

Permalink
update eslint, enable logical-assignment-operators rule
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Sep 24, 2022
1 parent 5853e7e commit ad96d14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ const base = {
'key-spacing': [ERROR, { beforeColon: false, afterColon: true }],
// enforce consistent linebreak style
'linebreak-style': [ERROR, 'unix'],
// require logical assignment operator shorthand
'logical-assignment-operators': [ERROR, ALWAYS],
// specify the maximum length of a line in your program
'max-len': [ERROR, {
code: 140,
Expand Down Expand Up @@ -699,6 +701,8 @@ const es3 = {
'comma-dangle': [ERROR, NEVER],
// encourages use of dot notation whenever possible
'dot-notation': [ERROR, { allowKeywords: false }],
// disallow logical assignment operator shorthand
'logical-assignment-operators': [ERROR, NEVER],
// disallow function or variable declarations in nested blocks
'no-inner-declarations': ERROR,
// require let or const instead of var
Expand Down Expand Up @@ -930,6 +934,8 @@ const transpiledAndPolyfilled = {

const nodePackages = {
...asyncAwait,
// disallow logical assignment operator shorthand
'logical-assignment-operators': [ERROR, NEVER],
// enforces the use of `catch()` on un-returned promises
'promise/catch-or-return': ERROR,
// disallow unsupported ECMAScript built-ins on the specified version
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"confusing-browser-globals": "^1.0.11",
"david": "^12.0.0",
"es-observable": "git+https://github.com/tc39/proposal-observable.git#d3404f06bc70c7c578a5047dfb3dc813730e3319",
"eslint": "^8.23.1",
"eslint": "^8.24.0",
"eslint-plugin-array-func": "^3.1.7",
"eslint-plugin-es-x": "^5.3.1",
"eslint-plugin-eslint-comments": "^3.2.0",
Expand Down

0 comments on commit ad96d14

Please sign in to comment.