eslint-plugin-chrome-extensions 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -8
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ npm i -D eslint-plugin-chrome-extensions
|
|
|
33
33
|
Usage
|
|
34
34
|
</h2>
|
|
35
35
|
|
|
36
|
-
### ESLint
|
|
36
|
+
### <img height=15 width=auto src="https://www.google.com/s2/favicons?domain=eslint.org&sz=64"> ESLint
|
|
37
37
|
|
|
38
38
|
Add bundled configs to your `eslint.config.*js` for each file type you need:
|
|
39
39
|
|
|
@@ -62,32 +62,37 @@ export default [
|
|
|
62
62
|
]
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
**Note:** Rule config is either a severity string (`'off'`, `'warn'`, `'error'`) or an array `[severity, options]` when the rule accepts options.
|
|
66
|
+
|
|
67
|
+
---
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
### <img height=15 width=auto src="https://www.google.com/s2/favicons?domain=oxc.rs&sz=64"> Oxlint
|
|
70
|
+
|
|
71
|
+
Add a JS bundle to your `oxlint.config.ts` (non-JS parsing is unsupported by Oxlint):
|
|
68
72
|
|
|
69
73
|
```ts
|
|
70
74
|
...
|
|
71
75
|
import chromeExtensions from 'eslint-plugin-chrome-extensions'
|
|
72
76
|
|
|
73
77
|
export default defineConfig({
|
|
74
|
-
// main config
|
|
75
78
|
overrides: [
|
|
76
|
-
// other
|
|
79
|
+
// other configs
|
|
77
80
|
{
|
|
78
81
|
files: ['**/extension/**/*.{cjs,js,jsx,mjs,ts,tsx}'],
|
|
79
82
|
jsPlugins: ['eslint-plugin-chrome-extensions'],
|
|
80
83
|
rules: {
|
|
81
84
|
...chromeExtensions.configs.recommended.rules,
|
|
82
|
-
'chrome-extensions/no-deprecated-apis': '
|
|
83
|
-
'chrome-extensions/no-insecure-messaging': ['
|
|
85
|
+
'chrome-extensions/no-deprecated-apis': 'allow', // selectively disable rule
|
|
86
|
+
'chrome-extensions/no-insecure-messaging': ['deny', { disallowWildcardTarget: false }] // selectively tweak rule
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
]
|
|
87
90
|
})
|
|
88
91
|
```
|
|
89
92
|
|
|
90
|
-
**Note:** Rule config is either a severity string (`'
|
|
93
|
+
**Note:** Rule config is either a severity string (`'allow'`, `'warn'`, `'deny'`) or an array `[severity, options]` when the rule accepts options.
|
|
94
|
+
|
|
95
|
+
**Note:** Oxlint is typically **6-20× faster than ESLint** w/ this plugin (due to its Rust core and parallel file processing).
|
|
91
96
|
|
|
92
97
|
---
|
|
93
98
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-chrome-extensions",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "ESLint rules for Chrome extensions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"eslintplugin",
|
|
9
9
|
"chrome-extensions",
|
|
10
10
|
"chromium",
|
|
11
|
+
"oxlint",
|
|
12
|
+
"oxlint-plugin",
|
|
11
13
|
"security"
|
|
12
14
|
],
|
|
13
15
|
"homepage": "https://codeberg.org/adamlui/eslint-plugin-chrome-extensions/#readme",
|
|
@@ -71,18 +73,18 @@
|
|
|
71
73
|
"@html-eslint/eslint-plugin": "^0.67.0",
|
|
72
74
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
73
75
|
"eslint": "^10.13.0",
|
|
74
|
-
"eslint-plugin-constructors": "^1.5.
|
|
76
|
+
"eslint-plugin-constructors": "^1.5.1",
|
|
75
77
|
"eslint-plugin-eslint-plugin": "^7.6.2",
|
|
76
78
|
"eslint-plugin-import-x": "^4.17.1",
|
|
77
|
-
"eslint-plugin-n": "^18.
|
|
79
|
+
"eslint-plugin-n": "^18.5.0",
|
|
78
80
|
"eslint-plugin-no-secrets": "^2.3.3",
|
|
79
81
|
"eslint-plugin-no-unsanitized": "^4.1.5",
|
|
80
|
-
"eslint-plugin-package-json": "^1.
|
|
82
|
+
"eslint-plugin-package-json": "^1.11.0",
|
|
81
83
|
"eslint-plugin-promise": "^7.3.0",
|
|
82
84
|
"eslint-plugin-regexp": "^3.3.1",
|
|
83
85
|
"eslint-plugin-security": "^4.2.0",
|
|
84
86
|
"eslint-plugin-sonarjs": "^4.2.2",
|
|
85
|
-
"eslint-plugin-woodpecker": "^1.1.
|
|
87
|
+
"eslint-plugin-woodpecker": "^1.1.1",
|
|
86
88
|
"oxlint": "^1.89.0"
|
|
87
89
|
},
|
|
88
90
|
"peerDependencies": {
|