Update and add new eslint plugins (#27698)
- Switch `eslint-plugin-import` to [`eslint-plugin-i`](https://github.com/un-es/eslint-plugin-i), a fork with better dependencies - Update `eslint-plugin-regexp` to 2.0.0 and add new rules - Add [`eslint-plugin-vitest`](https://github.com/veritem/eslint-plugin-vitest)
This commit is contained in:
parent
adbc995c34
commit
bd58266957
150
.eslintrc.yaml
150
.eslintrc.yaml
@ -11,13 +11,14 @@ parserOptions:
|
|||||||
plugins:
|
plugins:
|
||||||
- "@eslint-community/eslint-plugin-eslint-comments"
|
- "@eslint-community/eslint-plugin-eslint-comments"
|
||||||
- eslint-plugin-array-func
|
- eslint-plugin-array-func
|
||||||
- eslint-plugin-import
|
- eslint-plugin-i
|
||||||
- eslint-plugin-jquery
|
- eslint-plugin-jquery
|
||||||
- eslint-plugin-no-jquery
|
- eslint-plugin-no-jquery
|
||||||
- eslint-plugin-no-use-extend-native
|
- eslint-plugin-no-use-extend-native
|
||||||
- eslint-plugin-regexp
|
- eslint-plugin-regexp
|
||||||
- eslint-plugin-sonarjs
|
- eslint-plugin-sonarjs
|
||||||
- eslint-plugin-unicorn
|
- eslint-plugin-unicorn
|
||||||
|
- eslint-plugin-vitest
|
||||||
- eslint-plugin-vitest-globals
|
- eslint-plugin-vitest-globals
|
||||||
- eslint-plugin-wc
|
- eslint-plugin-wc
|
||||||
|
|
||||||
@ -41,14 +42,64 @@ overrides:
|
|||||||
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
|
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
|
||||||
- files: ["build/generate-images.js"]
|
- files: ["build/generate-images.js"]
|
||||||
rules:
|
rules:
|
||||||
import/no-unresolved: [0]
|
i/no-unresolved: [0]
|
||||||
import/no-extraneous-dependencies: [0]
|
i/no-extraneous-dependencies: [0]
|
||||||
- files: ["*.config.*"]
|
- files: ["*.config.*"]
|
||||||
rules:
|
rules:
|
||||||
import/no-unused-modules: [0]
|
i/no-unused-modules: [0]
|
||||||
- files: ["**/*.test.*", "web_src/js/test/setup.js"]
|
- files: ["**/*.test.*", "web_src/js/test/setup.js"]
|
||||||
env:
|
env:
|
||||||
vitest-globals/env: true
|
vitest-globals/env: true
|
||||||
|
rules:
|
||||||
|
vitest/consistent-test-filename: [0]
|
||||||
|
vitest/consistent-test-it: [0]
|
||||||
|
vitest/expect-expect: [0]
|
||||||
|
vitest/max-expects: [0]
|
||||||
|
vitest/max-nested-describe: [0]
|
||||||
|
vitest/no-alias-methods: [0]
|
||||||
|
vitest/no-commented-out-tests: [0]
|
||||||
|
vitest/no-conditional-expect: [0]
|
||||||
|
vitest/no-conditional-in-test: [0]
|
||||||
|
vitest/no-conditional-tests: [0]
|
||||||
|
vitest/no-disabled-tests: [0]
|
||||||
|
vitest/no-done-callback: [0]
|
||||||
|
vitest/no-duplicate-hooks: [0]
|
||||||
|
vitest/no-focused-tests: [0]
|
||||||
|
vitest/no-hooks: [0]
|
||||||
|
vitest/no-identical-title: [2]
|
||||||
|
vitest/no-interpolation-in-snapshots: [0]
|
||||||
|
vitest/no-large-snapshots: [0]
|
||||||
|
vitest/no-mocks-import: [0]
|
||||||
|
vitest/no-restricted-matchers: [0]
|
||||||
|
vitest/no-restricted-vi-methods: [0]
|
||||||
|
vitest/no-standalone-expect: [0]
|
||||||
|
vitest/no-test-prefixes: [0]
|
||||||
|
vitest/no-test-return-statement: [0]
|
||||||
|
vitest/prefer-called-with: [0]
|
||||||
|
vitest/prefer-comparison-matcher: [0]
|
||||||
|
vitest/prefer-each: [0]
|
||||||
|
vitest/prefer-equality-matcher: [0]
|
||||||
|
vitest/prefer-expect-resolves: [0]
|
||||||
|
vitest/prefer-hooks-in-order: [0]
|
||||||
|
vitest/prefer-hooks-on-top: [2]
|
||||||
|
vitest/prefer-lowercase-title: [0]
|
||||||
|
vitest/prefer-mock-promise-shorthand: [0]
|
||||||
|
vitest/prefer-snapshot-hint: [0]
|
||||||
|
vitest/prefer-spy-on: [0]
|
||||||
|
vitest/prefer-strict-equal: [0]
|
||||||
|
vitest/prefer-to-be: [0]
|
||||||
|
vitest/prefer-to-be-falsy: [0]
|
||||||
|
vitest/prefer-to-be-object: [0]
|
||||||
|
vitest/prefer-to-be-truthy: [0]
|
||||||
|
vitest/prefer-to-contain: [0]
|
||||||
|
vitest/prefer-to-have-length: [0]
|
||||||
|
vitest/prefer-todo: [0]
|
||||||
|
vitest/require-hook: [0]
|
||||||
|
vitest/require-to-throw-message: [0]
|
||||||
|
vitest/require-top-level-describe: [0]
|
||||||
|
vitest/valid-describe-callback: [2]
|
||||||
|
vitest/valid-expect: [2]
|
||||||
|
vitest/valid-title: [2]
|
||||||
- files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"]
|
- files: ["web_src/js/modules/fetch.js", "web_src/js/standalone/**/*"]
|
||||||
rules:
|
rules:
|
||||||
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
|
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
|
||||||
@ -113,49 +164,49 @@ rules:
|
|||||||
id-length: [0]
|
id-length: [0]
|
||||||
id-match: [0]
|
id-match: [0]
|
||||||
implicit-arrow-linebreak: [0]
|
implicit-arrow-linebreak: [0]
|
||||||
import/consistent-type-specifier-style: [0]
|
i/consistent-type-specifier-style: [0]
|
||||||
import/default: [0]
|
i/default: [0]
|
||||||
import/dynamic-import-chunkname: [0]
|
i/dynamic-import-chunkname: [0]
|
||||||
import/export: [2]
|
i/export: [2]
|
||||||
import/exports-last: [0]
|
i/exports-last: [0]
|
||||||
import/extensions: [2, always, {ignorePackages: true}]
|
i/extensions: [2, always, {ignorePackages: true}]
|
||||||
import/first: [2]
|
i/first: [2]
|
||||||
import/group-exports: [0]
|
i/group-exports: [0]
|
||||||
import/max-dependencies: [0]
|
i/max-dependencies: [0]
|
||||||
import/named: [2]
|
i/named: [2]
|
||||||
import/namespace: [0]
|
i/namespace: [0]
|
||||||
import/newline-after-import: [0]
|
i/newline-after-import: [0]
|
||||||
import/no-absolute-path: [0]
|
i/no-absolute-path: [0]
|
||||||
import/no-amd: [2]
|
i/no-amd: [2]
|
||||||
import/no-anonymous-default-export: [0]
|
i/no-anonymous-default-export: [0]
|
||||||
import/no-commonjs: [2]
|
i/no-commonjs: [2]
|
||||||
import/no-cycle: [2, {ignoreExternal: true, maxDepth: 1}]
|
i/no-cycle: [2, {ignoreExternal: true, maxDepth: 1}]
|
||||||
import/no-default-export: [0]
|
i/no-default-export: [0]
|
||||||
import/no-deprecated: [0]
|
i/no-deprecated: [0]
|
||||||
import/no-dynamic-require: [0]
|
i/no-dynamic-require: [0]
|
||||||
import/no-empty-named-blocks: [2]
|
i/no-empty-named-blocks: [2]
|
||||||
import/no-extraneous-dependencies: [2]
|
i/no-extraneous-dependencies: [2]
|
||||||
import/no-import-module-exports: [0]
|
i/no-import-module-exports: [0]
|
||||||
import/no-internal-modules: [0]
|
i/no-internal-modules: [0]
|
||||||
import/no-mutable-exports: [0]
|
i/no-mutable-exports: [0]
|
||||||
import/no-named-as-default-member: [0]
|
i/no-named-as-default-member: [0]
|
||||||
import/no-named-as-default: [2]
|
i/no-named-as-default: [2]
|
||||||
import/no-named-default: [0]
|
i/no-named-default: [0]
|
||||||
import/no-named-export: [0]
|
i/no-named-export: [0]
|
||||||
import/no-namespace: [0]
|
i/no-namespace: [0]
|
||||||
import/no-nodejs-modules: [0]
|
i/no-nodejs-modules: [0]
|
||||||
import/no-relative-packages: [0]
|
i/no-relative-packages: [0]
|
||||||
import/no-relative-parent-imports: [0]
|
i/no-relative-parent-imports: [0]
|
||||||
import/no-restricted-paths: [0]
|
i/no-restricted-paths: [0]
|
||||||
import/no-self-import: [2]
|
i/no-self-import: [2]
|
||||||
import/no-unassigned-import: [0]
|
i/no-unassigned-import: [0]
|
||||||
import/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$", ^vitest/]}]
|
i/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$", ^vitest/]}]
|
||||||
import/no-unused-modules: [2, {unusedExports: true}]
|
i/no-unused-modules: [2, {unusedExports: true}]
|
||||||
import/no-useless-path-segments: [2, {commonjs: true}]
|
i/no-useless-path-segments: [2, {commonjs: true}]
|
||||||
import/no-webpack-loader-syntax: [2]
|
i/no-webpack-loader-syntax: [2]
|
||||||
import/order: [0]
|
i/order: [0]
|
||||||
import/prefer-default-export: [0]
|
i/prefer-default-export: [0]
|
||||||
import/unambiguous: [0]
|
i/unambiguous: [0]
|
||||||
indent: [2, 2, {SwitchCase: 1}]
|
indent: [2, 2, {SwitchCase: 1}]
|
||||||
init-declarations: [0]
|
init-declarations: [0]
|
||||||
jquery/no-ajax-events: [2]
|
jquery/no-ajax-events: [2]
|
||||||
@ -501,6 +552,7 @@ rules:
|
|||||||
regexp/no-empty-character-class: [0]
|
regexp/no-empty-character-class: [0]
|
||||||
regexp/no-empty-group: [2]
|
regexp/no-empty-group: [2]
|
||||||
regexp/no-empty-lookarounds-assertion: [2]
|
regexp/no-empty-lookarounds-assertion: [2]
|
||||||
|
regexp/no-empty-string-literal: [2]
|
||||||
regexp/no-escape-backspace: [2]
|
regexp/no-escape-backspace: [2]
|
||||||
regexp/no-extra-lookaround-assertions: [0]
|
regexp/no-extra-lookaround-assertions: [0]
|
||||||
regexp/no-invalid-regexp: [2]
|
regexp/no-invalid-regexp: [2]
|
||||||
@ -531,6 +583,8 @@ rules:
|
|||||||
regexp/no-useless-non-capturing-group: [2]
|
regexp/no-useless-non-capturing-group: [2]
|
||||||
regexp/no-useless-quantifier: [2]
|
regexp/no-useless-quantifier: [2]
|
||||||
regexp/no-useless-range: [2]
|
regexp/no-useless-range: [2]
|
||||||
|
regexp/no-useless-set-operand: [2]
|
||||||
|
regexp/no-useless-string-literal: [2]
|
||||||
regexp/no-useless-two-nums-quantifier: [2]
|
regexp/no-useless-two-nums-quantifier: [2]
|
||||||
regexp/no-zero-quantifier: [2]
|
regexp/no-zero-quantifier: [2]
|
||||||
regexp/optimal-lookaround-quantifier: [2]
|
regexp/optimal-lookaround-quantifier: [2]
|
||||||
@ -550,10 +604,12 @@ rules:
|
|||||||
regexp/prefer-regexp-exec: [2]
|
regexp/prefer-regexp-exec: [2]
|
||||||
regexp/prefer-regexp-test: [2]
|
regexp/prefer-regexp-test: [2]
|
||||||
regexp/prefer-result-array-groups: [0]
|
regexp/prefer-result-array-groups: [0]
|
||||||
|
regexp/prefer-set-operation: [2]
|
||||||
regexp/prefer-star-quantifier: [2]
|
regexp/prefer-star-quantifier: [2]
|
||||||
regexp/prefer-unicode-codepoint-escapes: [2]
|
regexp/prefer-unicode-codepoint-escapes: [2]
|
||||||
regexp/prefer-w: [0]
|
regexp/prefer-w: [0]
|
||||||
regexp/require-unicode-regexp: [0]
|
regexp/require-unicode-regexp: [0]
|
||||||
|
regexp/simplify-set-operations: [2]
|
||||||
regexp/sort-alternatives: [0]
|
regexp/sort-alternatives: [0]
|
||||||
regexp/sort-character-class-elements: [0]
|
regexp/sort-character-class-elements: [0]
|
||||||
regexp/sort-flags: [0]
|
regexp/sort-flags: [0]
|
||||||
|
447
package-lock.json
generated
447
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -59,13 +59,14 @@
|
|||||||
"@vitejs/plugin-vue": "4.4.0",
|
"@vitejs/plugin-vue": "4.4.0",
|
||||||
"eslint": "8.51.0",
|
"eslint": "8.51.0",
|
||||||
"eslint-plugin-array-func": "4.0.0",
|
"eslint-plugin-array-func": "4.0.0",
|
||||||
"eslint-plugin-import": "2.28.1",
|
"eslint-plugin-i": "2.28.1",
|
||||||
"eslint-plugin-jquery": "1.5.1",
|
"eslint-plugin-jquery": "1.5.1",
|
||||||
"eslint-plugin-no-jquery": "2.7.0",
|
"eslint-plugin-no-jquery": "2.7.0",
|
||||||
"eslint-plugin-no-use-extend-native": "0.5.0",
|
"eslint-plugin-no-use-extend-native": "0.5.0",
|
||||||
"eslint-plugin-regexp": "1.15.0",
|
"eslint-plugin-regexp": "2.0.0",
|
||||||
"eslint-plugin-sonarjs": "0.21.0",
|
"eslint-plugin-sonarjs": "0.21.0",
|
||||||
"eslint-plugin-unicorn": "48.0.1",
|
"eslint-plugin-unicorn": "48.0.1",
|
||||||
|
"eslint-plugin-vitest": "0.3.2",
|
||||||
"eslint-plugin-vitest-globals": "1.4.0",
|
"eslint-plugin-vitest-globals": "1.4.0",
|
||||||
"eslint-plugin-vue": "9.17.0",
|
"eslint-plugin-vue": "9.17.0",
|
||||||
"eslint-plugin-vue-scoped-css": "2.5.1",
|
"eslint-plugin-vue-scoped-css": "2.5.1",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user