Skip to content

Commit

Permalink
Enable @typescript-eslint/no-use-before-define (#33715)
Browse files Browse the repository at this point in the history
The [rule](https://typescript-eslint.io/rules/no-use-before-define/) is
a superset of the eslint base rule, and I tested it with
#33514 (comment)
where it does not raise an error for cyclic types.
  • Loading branch information
silverwind authored Feb 25, 2025
1 parent 38ccc8e commit b35a9da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ module.exports = {
'@typescript-eslint/no-unsafe-unary-minus': [2],
'@typescript-eslint/no-unused-expressions': [0],
'@typescript-eslint/no-unused-vars': [2, {vars: 'all', args: 'all', caughtErrors: 'all', ignoreRestSiblings: false, argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_'}],
'@typescript-eslint/no-use-before-define': [0],
'@typescript-eslint/no-use-before-define': [2, {functions: false, classes: true, variables: true, allowNamedExports: true, typedefs: false, enums: false, ignoreTypeReferences: true}],
'@typescript-eslint/no-useless-constructor': [0],
'@typescript-eslint/no-useless-empty-export': [0],
'@typescript-eslint/no-wrapper-object-types': [2],
Expand Down Expand Up @@ -693,7 +693,7 @@ module.exports = {
'no-unused-labels': [2],
'no-unused-private-class-members': [2],
'no-unused-vars': [0], // handled by @typescript-eslint/no-unused-vars
'no-use-before-define': [2, {functions: false, classes: true, variables: true, allowNamedExports: true}],
'no-use-before-define': [0], // handled by @typescript-eslint/no-use-before-define
'no-use-extend-native/no-use-extend-native': [2],
'no-useless-backreference': [2],
'no-useless-call': [2],
Expand Down

0 comments on commit b35a9da

Please sign in to comment.