Skip to content

Commit

Permalink
feat: use @typescript-eslint version of no-shadow/no-redeclare
Browse files Browse the repository at this point in the history
Use @typescript-eslint versions of the no-shadow and no-redeclare rules.

Remove the no-undef rule since that is covered by typescript and not in
the recommended set of rules. See also
<typescript-eslint/typescript-eslint#2477 (comment)>.
  • Loading branch information
Tigge authored and anius committed Oct 2, 2020
1 parent a8a751c commit 0da120b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions index.js
Expand Up @@ -122,8 +122,6 @@ module.exports = {
'no-new-wrappers': 'error',
/** Disallow octal literals */
'no-octal': 'error',
/** Disallow variable redeclaration */
'no-redeclare': 'error',
/** Disallow assignments where both sides are exactly the same */
'no-self-assign': 'error',
/** Disallow `javascript:` urls */
Expand All @@ -140,12 +138,8 @@ module.exports = {
/**
* Variables
*/
/** Disallow variable declarations from shadowing variables declared in the outer scope */
'no-shadow': 'error',
/** Disallow identifiers from shadowing restricted names */
'no-shadow-restricted-names': 'error',
/** disallow the use of undeclared variables unless mentioned in global comments */
'no-undef': 'error',

/**
* ECMAScript 6
Expand Down Expand Up @@ -222,8 +216,12 @@ module.exports = {
'@typescript-eslint/no-non-null-assertion': 'error',
/** Disallow the use of parameter properties in class constructors */
'@typescript-eslint/no-parameter-properties': 'error',
/** Disallow variable redeclaration */
"@typescript-eslint/no-redeclare": "error",
/** Disallows invocation of require() */
'@typescript-eslint/no-require-imports': 'error',
/** Disallow variable declarations from shadowing variables declared in the outer scope */
"@typescript-eslint/no-shadow": "error",
/** Disallow aliasing this */
'@typescript-eslint/no-this-alias': 'error',
/** Warns when a namespace qualifier is unnecessary */
Expand Down

0 comments on commit 0da120b

Please sign in to comment.