mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-22 10:50:45 +08:00
Add eslint-plugin-wc
(#24689)
Add [eslint-plugin-wc](https://github.com/43081j/eslint-plugin-wc), another small set of eslint rules covering web components.
This commit is contained in:
parent
9173e079ae
commit
a4d6f83b5b
|
@ -16,6 +16,7 @@ plugins:
|
||||||
- eslint-plugin-sonarjs
|
- eslint-plugin-sonarjs
|
||||||
- eslint-plugin-custom-elements
|
- eslint-plugin-custom-elements
|
||||||
- eslint-plugin-regexp
|
- eslint-plugin-regexp
|
||||||
|
- eslint-plugin-wc
|
||||||
|
|
||||||
env:
|
env:
|
||||||
es2022: true
|
es2022: true
|
||||||
|
@ -717,6 +718,15 @@ rules:
|
||||||
use-isnan: [2]
|
use-isnan: [2]
|
||||||
valid-typeof: [2, {requireStringLiterals: true}]
|
valid-typeof: [2, {requireStringLiterals: true}]
|
||||||
vars-on-top: [0]
|
vars-on-top: [0]
|
||||||
|
wc/attach-shadow-constructor: [2]
|
||||||
|
wc/guard-super-call: [2]
|
||||||
|
wc/no-closed-shadow-root: [2]
|
||||||
|
wc/no-constructor-attributes: [2]
|
||||||
|
wc/no-constructor-params: [2]
|
||||||
|
wc/no-invalid-element-name: [0] # covered by custom-elements/valid-tag-name
|
||||||
|
wc/no-self-class: [2]
|
||||||
|
wc/no-typos: [2]
|
||||||
|
wc/require-listener-teardown: [2]
|
||||||
wrap-iife: [2, inside]
|
wrap-iife: [2, inside]
|
||||||
wrap-regex: [0]
|
wrap-regex: [0]
|
||||||
yield-star-spacing: [2, after]
|
yield-star-spacing: [2, after]
|
||||||
|
|
29
package-lock.json
generated
29
package-lock.json
generated
|
@ -68,6 +68,7 @@
|
||||||
"eslint-plugin-sonarjs": "0.19.0",
|
"eslint-plugin-sonarjs": "0.19.0",
|
||||||
"eslint-plugin-unicorn": "47.0.0",
|
"eslint-plugin-unicorn": "47.0.0",
|
||||||
"eslint-plugin-vue": "9.12.0",
|
"eslint-plugin-vue": "9.12.0",
|
||||||
|
"eslint-plugin-wc": "1.5.0",
|
||||||
"jsdom": "22.0.0",
|
"jsdom": "22.0.0",
|
||||||
"markdownlint-cli": "0.34.0",
|
"markdownlint-cli": "0.34.0",
|
||||||
"stylelint": "15.6.1",
|
"stylelint": "15.6.1",
|
||||||
|
@ -4683,6 +4684,19 @@
|
||||||
"eslint": "^6.2.0 || ^7.0.0 || ^8.0.0"
|
"eslint": "^6.2.0 || ^7.0.0 || ^8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-plugin-wc": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-wc/-/eslint-plugin-wc-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-KFSfiHDol/LeV7U6IX8GdgpGf/s3wG8FTG120Rml/hGNB/DkCuGYQhlf0VgdBdf7gweem8Nlsh5o64HNdj+qPA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"is-valid-element-name": "^1.0.0",
|
||||||
|
"js-levenshtein-esm": "^1.2.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"eslint": ">=5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-scope": {
|
"node_modules/eslint-scope": {
|
||||||
"version": "7.2.0",
|
"version": "7.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz",
|
||||||
|
@ -5994,6 +6008,15 @@
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-valid-element-name": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-valid-element-name/-/is-valid-element-name-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-GZITEJY2LkSjQfaIPBha7eyZv+ge0PhBR7KITeCCWvy7VBQrCUdFkvpI+HrAPQjVtVjy1LvlEkqQTHckoszruw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"is-potential-custom-element-name": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-weakref": {
|
"node_modules/is-weakref": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
|
||||||
|
@ -6086,6 +6109,12 @@
|
||||||
"node": ">=0.8.0"
|
"node": ">=0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/js-levenshtein-esm": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-levenshtein-esm/-/js-levenshtein-esm-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-fzreKVq1eD7eGcQr7MtRpQH94f8gIfhdrc7yeih38xh684TNMK9v5aAu2wxfIRMk/GpAJRrzcirMAPIaSDaByQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/js-sdsl": {
|
"node_modules/js-sdsl": {
|
||||||
"version": "4.4.0",
|
"version": "4.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz",
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
"eslint-plugin-sonarjs": "0.19.0",
|
"eslint-plugin-sonarjs": "0.19.0",
|
||||||
"eslint-plugin-unicorn": "47.0.0",
|
"eslint-plugin-unicorn": "47.0.0",
|
||||||
"eslint-plugin-vue": "9.12.0",
|
"eslint-plugin-vue": "9.12.0",
|
||||||
|
"eslint-plugin-wc": "1.5.0",
|
||||||
"jsdom": "22.0.0",
|
"jsdom": "22.0.0",
|
||||||
"markdownlint-cli": "0.34.0",
|
"markdownlint-cli": "0.34.0",
|
||||||
"stylelint": "15.6.1",
|
"stylelint": "15.6.1",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user