eslint-plugin-chrome-extensions 2.9.0 → 2.9.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 +3 -3
- package/docs/LICENSE.md +1 -1
- package/package.json +10 -8
- package/src/utils/node.js +1 -3
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ export default [
|
|
|
45
45
|
// other configs
|
|
46
46
|
{
|
|
47
47
|
files: ['**/extension/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}'], ...chromeExtensions.configs.recommended,
|
|
48
|
-
rules: {
|
|
48
|
+
rules: { // include this block if customizing rules
|
|
49
49
|
...chromeExtensions.configs.recommended.rules,
|
|
50
50
|
'chrome-extensions/no-deprecated-apis': 'off', // selectively disable rule
|
|
51
51
|
'chrome-extensions/valid-version-field': ['error', { versionType: 'date' }] // selectively tweak rule
|
|
@@ -67,7 +67,7 @@ export default [
|
|
|
67
67
|
|
|
68
68
|
### <img height=15 width=auto src="https://www.google.com/s2/favicons?domain=oxc.rs&sz=64"> Oxlint
|
|
69
69
|
|
|
70
|
-
Add a JS bundle to your `oxlint.config
|
|
70
|
+
Add a JS/TS bundle to your `oxlint.config.*ts` (non-JS/TS parsing is unsupported by Oxlint):
|
|
71
71
|
|
|
72
72
|
```ts
|
|
73
73
|
...
|
|
@@ -95,7 +95,7 @@ export default defineConfig({
|
|
|
95
95
|
|
|
96
96
|
---
|
|
97
97
|
|
|
98
|
-
*Available JS bundles:* `recommended`, `strict` (everything), `problem` (deterministic bugs only), `security`
|
|
98
|
+
*Available JS/TS bundles:* `recommended`, `strict` (everything), `problem` (deterministic bugs only), `security`
|
|
99
99
|
|
|
100
100
|
*Available filetype bundles (ESLint only):* `manifest`, `license`, `css`, `html`, `json`, `json5`, `jsonc`
|
|
101
101
|
|
package/docs/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MIT License
|
|
2
2
|
|
|
3
|
-
**Copyright © 2026 [Adam Lui](https://codeberg.org/adamlui)
|
|
3
|
+
**Copyright © 2026 [Adam Lui](https://codeberg.org/adamlui).**
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-chrome-extensions",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "ESLint rules for Chrome extensions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -73,20 +73,22 @@
|
|
|
73
73
|
"@html-eslint/eslint-plugin": "^0.67.0",
|
|
74
74
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
75
75
|
"@typescript-eslint/parser": "^8.72.1",
|
|
76
|
-
"eslint": "^10.
|
|
77
|
-
"eslint-plugin-constructors": "^1.
|
|
76
|
+
"eslint": "^10.14.0",
|
|
77
|
+
"eslint-plugin-constructors": "^1.7.0",
|
|
78
78
|
"eslint-plugin-eslint-plugin": "^7.6.2",
|
|
79
79
|
"eslint-plugin-import-x": "^4.17.1",
|
|
80
80
|
"eslint-plugin-n": "^18.5.0",
|
|
81
81
|
"eslint-plugin-no-secrets": "^2.3.3",
|
|
82
82
|
"eslint-plugin-no-unsanitized": "^4.1.5",
|
|
83
|
-
"eslint-plugin-package-json": "^1.
|
|
83
|
+
"eslint-plugin-package-json": "^1.12.0",
|
|
84
84
|
"eslint-plugin-promise": "^7.3.0",
|
|
85
|
-
"eslint-plugin-regexp": "^3.3.
|
|
86
|
-
"eslint-plugin-security": "^4.2.
|
|
85
|
+
"eslint-plugin-regexp": "^3.3.2",
|
|
86
|
+
"eslint-plugin-security": "^4.2.1",
|
|
87
87
|
"eslint-plugin-sonarjs": "^4.2.2",
|
|
88
|
-
"eslint-plugin-woodpecker": "^1.1.
|
|
89
|
-
"oxlint": "^1.
|
|
88
|
+
"eslint-plugin-woodpecker": "^1.1.2",
|
|
89
|
+
"oxlint": "^1.90.0",
|
|
90
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
91
|
+
"typescript-latest": "npm:typescript@^7.0.2"
|
|
90
92
|
},
|
|
91
93
|
"peerDependencies": {
|
|
92
94
|
"@eslint/css": ">=0.1.0",
|
package/src/utils/node.js
CHANGED
|
@@ -39,9 +39,7 @@ export default {
|
|
|
39
39
|
plainType(node, prefix) { return node?.type?.replace(prefix, '') ?? '' },
|
|
40
40
|
|
|
41
41
|
unwrapTS(node) {
|
|
42
|
-
while (node
|
|
43
|
-
&& ['TSAsExpression', 'TSTypeAssertion', 'TSNonNullExpression', 'TSSatisfiesExpression'].includes(node.type)
|
|
44
|
-
) node = node.expression
|
|
42
|
+
while (node?.type?.startsWith('TS') && node.expression) node = node.expression
|
|
45
43
|
return node
|
|
46
44
|
}
|
|
47
45
|
}
|