Skip to content

Commit 8b03a3b

Browse files
authored
fix: disable no-use-before-define (#155)
1 parent af56633 commit 8b03a3b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.eslintrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ module.exports = {
376376
ignoreRestSiblings: true,
377377
},
378378
],
379-
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
379+
// no-use-before-define goes against the top-to-bottom rule and TypeScript protects against most temporal deadzone bugs.
380+
// https://dzone.com/articles/the-stepdown-rule
381+
'@typescript-eslint/no-use-before-define': 'off',
380382
'@typescript-eslint/no-useless-constructor': 'error',
381383
'@typescript-eslint/no-var-requires': 'error',
382384
'@typescript-eslint/prefer-as-const': 'error',
@@ -419,7 +421,6 @@ module.exports = {
419421
rules: {
420422
'no-var': 'off',
421423
'@typescript-eslint/explicit-member-accessibility': 'off',
422-
'@typescript-eslint/no-use-before-define': 'off',
423424
'unicorn/prevent-abbreviations': 'off',
424425
'id-length': 'off',
425426
},

0 commit comments

Comments
 (0)