mirror of https://github.com/go-gitea/gitea.git
Add eslint-plugin-custom-elements (#23991)
Add [eslint-plugin-custom-elements](https://github.com/github/eslint-plugin-custom-elements) and enable all rules that I've found sensible.
This commit is contained in:
parent
b918a2c4fb
commit
3037922a9b
|
@ -13,6 +13,7 @@ plugins:
|
||||||
- eslint-plugin-import
|
- eslint-plugin-import
|
||||||
- eslint-plugin-jquery
|
- eslint-plugin-jquery
|
||||||
- eslint-plugin-sonarjs
|
- eslint-plugin-sonarjs
|
||||||
|
- eslint-plugin-custom-elements
|
||||||
|
|
||||||
env:
|
env:
|
||||||
es2022: true
|
es2022: true
|
||||||
|
@ -62,6 +63,19 @@ rules:
|
||||||
consistent-this: [0]
|
consistent-this: [0]
|
||||||
constructor-super: [2]
|
constructor-super: [2]
|
||||||
curly: [0]
|
curly: [0]
|
||||||
|
custom-elements/expose-class-on-global: [0]
|
||||||
|
custom-elements/extends-correct-class: [2]
|
||||||
|
custom-elements/file-name-matches-element: [0]
|
||||||
|
custom-elements/no-constructor: [2]
|
||||||
|
custom-elements/no-customized-built-in-elements: [2]
|
||||||
|
custom-elements/no-dom-traversal-in-attributechangedcallback: [2]
|
||||||
|
custom-elements/no-dom-traversal-in-connectedcallback: [2]
|
||||||
|
custom-elements/no-exports-with-element: [2]
|
||||||
|
custom-elements/no-method-prefixed-with-on: [2]
|
||||||
|
custom-elements/no-unchecked-define: [0]
|
||||||
|
custom-elements/one-element-per-file: [0]
|
||||||
|
custom-elements/tag-name-matches-class: [2]
|
||||||
|
custom-elements/valid-tag-name: [2]
|
||||||
default-case-last: [2]
|
default-case-last: [2]
|
||||||
default-case: [0]
|
default-case: [0]
|
||||||
default-param-last: [0]
|
default-param-last: [0]
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
"@stoplight/spectral-cli": "6.6.0",
|
"@stoplight/spectral-cli": "6.6.0",
|
||||||
"@vitejs/plugin-vue": "4.1.0",
|
"@vitejs/plugin-vue": "4.1.0",
|
||||||
"eslint": "8.37.0",
|
"eslint": "8.37.0",
|
||||||
|
"eslint-plugin-custom-elements": "0.0.7",
|
||||||
"eslint-plugin-import": "2.27.5",
|
"eslint-plugin-import": "2.27.5",
|
||||||
"eslint-plugin-jquery": "1.5.1",
|
"eslint-plugin-jquery": "1.5.1",
|
||||||
"eslint-plugin-sonarjs": "0.19.0",
|
"eslint-plugin-sonarjs": "0.19.0",
|
||||||
|
@ -4475,6 +4476,15 @@
|
||||||
"ms": "^2.1.1"
|
"ms": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-plugin-custom-elements": {
|
||||||
|
"version": "0.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-custom-elements/-/eslint-plugin-custom-elements-0.0.7.tgz",
|
||||||
|
"integrity": "sha512-s37mXujv/fAsPlvoLbO8jiZDM2gc/dFXIDf7wK52LMrsTsLpE5ITugQCwPM8lmcONjYdswS5kneX9LzJlt7aTA==",
|
||||||
|
"dev": true,
|
||||||
|
"peerDependencies": {
|
||||||
|
"eslint": ">=4.19.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-plugin-import": {
|
"node_modules/eslint-plugin-import": {
|
||||||
"version": "2.27.5",
|
"version": "2.27.5",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz",
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
"@stoplight/spectral-cli": "6.6.0",
|
"@stoplight/spectral-cli": "6.6.0",
|
||||||
"@vitejs/plugin-vue": "4.1.0",
|
"@vitejs/plugin-vue": "4.1.0",
|
||||||
"eslint": "8.37.0",
|
"eslint": "8.37.0",
|
||||||
|
"eslint-plugin-custom-elements": "0.0.7",
|
||||||
"eslint-plugin-import": "2.27.5",
|
"eslint-plugin-import": "2.27.5",
|
||||||
"eslint-plugin-jquery": "1.5.1",
|
"eslint-plugin-jquery": "1.5.1",
|
||||||
"eslint-plugin-sonarjs": "0.19.0",
|
"eslint-plugin-sonarjs": "0.19.0",
|
||||||
|
|
Loading…
Reference in New Issue