Add eslint-plugin-eslint-comments (#24690)

Add
[eslint-plugin-eslint-comments](https://github.com/mysticatea/eslint-plugin-eslint-comments)
which prevents some abuse related to eslint comments.
This commit is contained in:
silverwind 2023-05-12 22:38:17 +02:00 committed by GitHub
parent a4d6f83b5b
commit f745016092
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 0 deletions

View file

@ -17,6 +17,7 @@ plugins:
- eslint-plugin-custom-elements
- eslint-plugin-regexp
- eslint-plugin-wc
- eslint-plugin-eslint-comments
env:
es2022: true
@ -86,6 +87,15 @@ rules:
dot-notation: [0]
eol-last: [2]
eqeqeq: [2]
eslint-comments/disable-enable-pair: [2]
eslint-comments/no-aggregating-enable: [2]
eslint-comments/no-duplicate-disable: [2]
eslint-comments/no-restricted-disable: [0]
eslint-comments/no-unlimited-disable: [2]
eslint-comments/no-unused-disable: [2]
eslint-comments/no-unused-enable: [2]
eslint-comments/no-use: [0]
eslint-comments/require-description: [0]
for-direction: [2]
func-call-spacing: [2, never]
func-name-matching: [2]

29
package-lock.json generated
View file

@ -61,6 +61,7 @@
"@vitejs/plugin-vue": "4.2.3",
"eslint": "8.40.0",
"eslint-plugin-custom-elements": "0.0.8",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jquery": "1.5.1",
"eslint-plugin-no-jquery": "2.7.0",
@ -4519,6 +4520,34 @@
"eslint": ">=4.19.0"
}
},
"node_modules/eslint-plugin-eslint-comments": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz",
"integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==",
"dev": true,
"dependencies": {
"escape-string-regexp": "^1.0.5",
"ignore": "^5.0.5"
},
"engines": {
"node": ">=6.5.0"
},
"funding": {
"url": "https://github.com/sponsors/mysticatea"
},
"peerDependencies": {
"eslint": ">=4.19.1"
}
},
"node_modules/eslint-plugin-eslint-comments/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/eslint-plugin-import": {
"version": "2.27.5",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz",

View file

@ -61,6 +61,7 @@
"@vitejs/plugin-vue": "4.2.3",
"eslint": "8.40.0",
"eslint-plugin-custom-elements": "0.0.8",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jquery": "1.5.1",
"eslint-plugin-no-jquery": "2.7.0",