Skip to content

Commit

Permalink
Fix incorrect no-shadow warnings for TS enums (#315)
Browse files Browse the repository at this point in the history
* fix: bad no-shadow warnings for TS enums
* chore: add changeset
  • Loading branch information
agerard-godaddy committed May 5, 2023
1 parent eade664 commit c2e15c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/witty-guests-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"eslint-config-godaddy-react-typescript": patch
"eslint-config-godaddy-typescript": patch
---

Fix incorrect no-shadow warnings for TS enums
6 changes: 5 additions & 1 deletion packages/eslint-config-godaddy-react-typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ module.exports = {
args: 'after-used',
ignoreRestSiblings: false
}
]
],
// Disable the base rule and enable TypeScript version to avoid incorrect reports
// See https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-shadow.md
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'warn'
}
},
{
Expand Down
6 changes: 5 additions & 1 deletion packages/eslint-config-godaddy-typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ module.exports = {
args: 'after-used',
ignoreRestSiblings: false
}
]
],
// Disable the base rule and enable TypeScript version to avoid incorrect reports
// See https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-shadow.md
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'warn'
}
}
]
Expand Down

0 comments on commit c2e15c2

Please sign in to comment.