aboutsummaryrefslogtreecommitdiffstats
path: root/.eslintrc.cjs
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2025-02-25 16:30:31 +0100
committerGitHub <noreply@github.com>2025-02-25 16:30:31 +0100
commitb35a9da14c59f440e2a20a4a7677ac3ce1164436 (patch)
tree4692a951c94dafd3f1f71fd114ac3c05ed8998d6 /.eslintrc.cjs
parent38ccc8e3e48e9b15f175287c0721ce0ff9892e5a (diff)
downloadgitea-b35a9da14c59f440e2a20a4a7677ac3ce1164436.tar.gz
gitea-b35a9da14c59f440e2a20a4a7677ac3ce1164436.zip
Enable `@typescript-eslint/no-use-before-define` (#33715)
The [rule](https://typescript-eslint.io/rules/no-use-before-define/) is a superset of the eslint base rule, and I tested it with https://github.com/go-gitea/gitea/pull/33514#discussion_r1969795271 where it does not raise an error for cyclic types.
Diffstat (limited to '.eslintrc.cjs')
-rw-r--r--.eslintrc.cjs4
1 files changed, 2 insertions, 2 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 83410dc07c..f2af1709e4 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -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],
@@ -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],