Skip to content

Commit

Permalink
Merge pull request #7264 from shirady/lint-const-let
Browse files Browse the repository at this point in the history
Change Rules In `.eslintrc.js` + Bump `eslint` Version
  • Loading branch information
shirady authored Apr 16, 2023
2 parents fdebb3a + 7cfcad1 commit 50a6761
Show file tree
Hide file tree
Showing 215 changed files with 1,932 additions and 1,939 deletions.
14 changes: 8 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ module.exports = {
// instead of expression (foo = function() {})
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],

"prefer-const": ["error", {
"destructuring": "all",
"ignoreReadBeforeAssign": false
}],

//////////////////////////////////////////////////////////////////////
// //
// WARN //
Expand Down Expand Up @@ -295,9 +300,6 @@ module.exports = {
// we do allow _name or name_ as identifiers
'no-underscore-dangle': 'off',

// prefer to use let/const instead of var
'no-var': 'off',

// turn off todo/fixme comments - will grep it to a different report
'no-warning-comments': 'off',

Expand All @@ -319,9 +321,6 @@ module.exports = {
// prefer using arrow functions for callbacks, but too much to fix
'prefer-named-capture-group': 'off',

// we prefer using const, but too much to fix
'prefer-const': 'off',

// we prefer using destructuring, but too much to fix
'prefer-destructuring': 'off',

Expand Down Expand Up @@ -356,5 +355,8 @@ module.exports = {

//Allow spacing between template tags and their literals
'template-tag-spacing': 'off',

// we prefer not to adopt the logical assignment operators from ES2020
'logical-assignment-operators': 'off'
}
};
Loading

0 comments on commit 50a6761

Please sign in to comment.