diff options
author | silverwind <me@silverwind.io> | 2023-05-18 03:14:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 09:14:31 +0800 |
commit | 4aacc3ac784601339f663881e5cc253e982b3f37 (patch) | |
tree | ac5d3d2d8a1b88f190bbef3124e904b6cc3d0463 /.eslintrc.yaml | |
parent | 71451ab8441b67a3629052e29b26b7ac815953f2 (diff) | |
download | gitea-4aacc3ac784601339f663881e5cc253e982b3f37.tar.gz gitea-4aacc3ac784601339f663881e5cc253e982b3f37.zip |
Add two eslint plugins (#24776)
Add these two plugins and autofix issues:
-
[eslint-plugin-no-use-extend-native](https://github.com/dustinspecker/eslint-plugin-no-use-extend-native)
-
[eslint-plugin-array-func](https://github.com/freaktechnik/eslint-plugin-array-func)
Diffstat (limited to '.eslintrc.yaml')
-rw-r--r-- | .eslintrc.yaml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.eslintrc.yaml b/.eslintrc.yaml index fd1b6da2c0..f4b1e67534 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -10,10 +10,12 @@ parserOptions: plugins: - "@eslint-community/eslint-plugin-eslint-comments" + - eslint-plugin-array-func - eslint-plugin-custom-elements - eslint-plugin-import - eslint-plugin-jquery - eslint-plugin-no-jquery + - eslint-plugin-no-use-extend-native - eslint-plugin-regexp - eslint-plugin-sonarjs - eslint-plugin-unicorn @@ -59,6 +61,12 @@ rules: array-bracket-spacing: [2, never] array-callback-return: [2, {checkForEach: true}] array-element-newline: [0] + array-func/avoid-reverse: [2] + array-func/from-map: [2] + array-func/no-unnecessary-this-arg: [2] + array-func/prefer-array-from: [2] + array-func/prefer-flat-map: [0] # handled by unicorn/prefer-array-flat-map + array-func/prefer-flat: [0] # handled by unicorn/prefer-array-flat arrow-body-style: [0] arrow-parens: [2, always] arrow-spacing: [2, {before: true, after: true}] @@ -444,6 +452,7 @@ rules: no-unused-private-class-members: [2] no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}] no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}] + no-use-extend-native/no-use-extend-native: [2] no-useless-backreference: [2] no-useless-call: [2] no-useless-catch: [2] |