Skip to content

Commit fc82044

Browse files
authored
feat: tweaking our use of the no-use-before-define rule in TS (#338)
1 parent 6e21c8a commit fc82044

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

typescript.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,10 @@ module.exports = {
3131
// The stock `no-unused-vars` ESlint rule doesn't play with TS.
3232
'no-unused-vars': 'off',
3333
'@typescript-eslint/no-unused-vars': ['error'],
34+
35+
// The stock `no-use-before-define` ESLint rule throws errors when TS interfaces, types, and
36+
// enums are used before they're defined -- eventhough in TS that's OK.
37+
'no-use-before-define': 'off',
38+
'@typescript-eslint/no-use-before-define': ['error'],
3439
},
3540
};

0 commit comments

Comments
 (0)