Skip to content

Commit

Permalink
enable id-denylist for disallowing ES3 reserved words as ids
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Sep 2, 2021
1 parent f622c80 commit 7810ba8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.js
Expand Up @@ -603,6 +603,33 @@ const es3 = {
'comma-dangle': [ERROR, NEVER],
// encourages use of dot notation whenever possible
'dot-notation': [ERROR, { allowKeywords: false }],
// disallow ES3 reserved words as identifiers
// wait for resolving https://github.com/eslint/eslint/issues/15017
'id-denylist': [ERROR,
'abstract',
'int',
'short',
'boolean',
'interface',
'static',
'byte',
'long',
'char',
'final',
'native',
'synchronized',
'float',
'package',
'throws',
'goto',
'private',
'transient',
'implements',
'protected',
'volatile',
'double',
'public',
],
// disallow function or variable declarations in nested blocks
'no-inner-declarations': ERROR,
// require let or const instead of var
Expand Down

0 comments on commit 7810ba8

Please sign in to comment.