Skip to content

Commit d03173e

Browse files
committed
feat(typescript)!: Add @typescript-eslint/no-unsafe-enum-comparison rule
BREAKING CHANGE: With new `@typescript-eslint/no-unsafe-enum-comparison` rule default config become more strict.
1 parent a2ff2db commit d03173e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

configurations/typescript/rules/typescript.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,10 @@ module.exports = {
509509
// https://typescript-eslint.io/rules/no-unsafe-declaration-merging
510510
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
511511

512+
// Disallow comparing an enum value with a non-enum value
513+
// https://typescript-eslint.io/rules/no-unsafe-enum-comparison
514+
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
515+
512516
// Disallows member access on any typed variables
513517
// https://typescript-eslint.io/rules/no-unsafe-member-access
514518
'@typescript-eslint/no-unsafe-member-access': 'off',

0 commit comments

Comments
 (0)