eslint-plugin-greasemonkey 1.10.3 → 1.10.4
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 -13
- package/package.json +4 -4
- package/src/rules/no-insecure-fetch.js +1 -1
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ export default defineConfig({
|
|
|
120
120
|
|
|
121
121
|
<h4 id="meta-order-options">Options</h4>
|
|
122
122
|
|
|
123
|
-
- `order` (default `[]`) – metadata keys in custom order (e.g. `['license', 'namespace']`) to selectively override built-in order with
|
|
123
|
+
- `order` (default `[]`) – metadata keys in custom order (e.g. `['license', 'namespace']`) to selectively override built-in order with
|
|
124
124
|
|
|
125
125
|
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
126
126
|
|
|
@@ -207,7 +207,7 @@ If you don't care about the order of metadata fields.
|
|
|
207
207
|
|
|
208
208
|
<h4 id="meta-spacing-options">Options</h4>
|
|
209
209
|
|
|
210
|
-
- `spaces` (default `3`) – minimum spaces after the longest key
|
|
210
|
+
- `spaces` (default `3`) – minimum spaces after the longest key
|
|
211
211
|
|
|
212
212
|
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
213
213
|
|
|
@@ -519,8 +519,8 @@ If you intentionally handle messages from any origin, or broadcast to any frame
|
|
|
519
519
|
|
|
520
520
|
<h4 id="no-invalid-grants-options">Options</h4>
|
|
521
521
|
|
|
522
|
-
- `target` (default `'all'`) – manager(s) whose grants to validate against (`'all'`, `'tampermonkey'`, `'violentmonkey'`, `'greasemonkey'`, `'scriptcat'`, `'adguard'`), as a single string or array
|
|
523
|
-
- `allowedGrants` (default `[]`) – additional `@grant` values to allow beyond the built-in list (covering Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat and AdGuard), as a single string or array
|
|
522
|
+
- `target` (default `'all'`) – manager(s) whose grants to validate against (`'all'`, `'tampermonkey'`, `'violentmonkey'`, `'greasemonkey'`, `'scriptcat'`, `'adguard'`), as a single string or array
|
|
523
|
+
- `allowedGrants` (default `[]`) – additional `@grant` values to allow beyond the built-in list (covering Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat and AdGuard), as a single string or array
|
|
524
524
|
|
|
525
525
|
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
526
526
|
|
|
@@ -616,8 +616,8 @@ If you don't want `@grant` validation at all. For individual uncovered grants, p
|
|
|
616
616
|
|
|
617
617
|
<h4 id="no-invalid-headers-options">Options</h4>
|
|
618
618
|
|
|
619
|
-
- `target` (default `'all'`) – manager(s) whose headers to validate against (`'all'`, `'tampermonkey'`, `'violentmonkey'`, `'greasemonkey'`, `'scriptcat'`, `'adguard'`), as a single string or array
|
|
620
|
-
- `allowedHeaders` (default `[]`) – additional headers to allow (strings or regexes), as a single value or array
|
|
619
|
+
- `target` (default `'all'`) – manager(s) whose headers to validate against (`'all'`, `'tampermonkey'`, `'violentmonkey'`, `'greasemonkey'`, `'scriptcat'`, `'adguard'`), as a single string or array
|
|
620
|
+
- `allowedHeaders` (default `[]`) – additional headers to allow (strings or regexes), as a single value or array
|
|
621
621
|
|
|
622
622
|
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
623
623
|
|
|
@@ -1321,7 +1321,7 @@ If you don't distribute your script, or you intentionally omit a license field.
|
|
|
1321
1321
|
|
|
1322
1322
|
<h4 id="require-matching-localized-fields-options">Options</h4>
|
|
1323
1323
|
|
|
1324
|
-
- `ignoreLanguages` (default `[]`) – language code(s) to skip (e.g. `'de'` or `['es', 'fr']`)
|
|
1324
|
+
- `ignoreLanguages` (default `[]`) – language code(s) to skip (e.g. `'de'` or `['es', 'fr']`)
|
|
1325
1325
|
|
|
1326
1326
|
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
1327
1327
|
|
|
@@ -1395,8 +1395,8 @@ If you intentionally provide localized names without descriptions (or vice versa
|
|
|
1395
1395
|
|
|
1396
1396
|
<h4 id="require-required-fields-options">Options</h4>
|
|
1397
1397
|
|
|
1398
|
-
- `fields` (default `['name', 'version']`) – override the required field list
|
|
1399
|
-
- `requireMatchOrInclude` (default `true`) – require `@match` or `@include`
|
|
1398
|
+
- `fields` (default `['name', 'version']`) – override the required field list
|
|
1399
|
+
- `requireMatchOrInclude` (default `true`) – require `@match` or `@include`
|
|
1400
1400
|
|
|
1401
1401
|
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
1402
1402
|
|
|
@@ -1532,7 +1532,7 @@ If you intentionally use a different prefix style.
|
|
|
1532
1532
|
|
|
1533
1533
|
<h4 id="require-sri-hashing-options">Options</h4>
|
|
1534
1534
|
|
|
1535
|
-
- `algorithm` (default `'sha256'`) – SRI hash algorithm(s) to enforce (`'md5'`, `'sha1'`, `'sha256'`, `'sha384'`, `'sha512'`), as a single string or array
|
|
1535
|
+
- `algorithm` (default `'sha256'`) – SRI hash algorithm(s) to enforce (`'md5'`, `'sha1'`, `'sha256'`, `'sha384'`, `'sha512'`), as a single string or array
|
|
1536
1536
|
|
|
1537
1537
|
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
1538
1538
|
|
|
@@ -1708,9 +1708,9 @@ If you intentionally name your userscripts something other than `*.user.js`.
|
|
|
1708
1708
|
|
|
1709
1709
|
<h4 id="valid-field-values-options">Options</h4>
|
|
1710
1710
|
|
|
1711
|
-
- `versionType` (default `'semver'`) – version format to enforce (`'semver'`, `'date'`)
|
|
1712
|
-
- `allowFutureDate` (default `false`) – allow `@version` dates later than the current date
|
|
1713
|
-
- `timezone` (default `''`) – <a target="_blank" href="https://data.iana.org/time-zones/tzdb/zone1970.tab">IANA timezone</a> used to determine the current date (when omitted, only year/month are enforced)
|
|
1711
|
+
- `versionType` (default `'semver'`) – version format to enforce (`'semver'`, `'date'`)
|
|
1712
|
+
- `allowFutureDate` (default `false`) – allow `@version` dates later than the current date
|
|
1713
|
+
- `timezone` (default `''`) – <a target="_blank" href="https://data.iana.org/time-zones/tzdb/zone1970.tab">IANA timezone</a> used to determine the current date (when omitted, only year/month are enforced)
|
|
1714
1714
|
|
|
1715
1715
|
#### <img width=13 height=13 src="https://cdn.staticdelivr.com/gl/adamlui/eslint-plugin-greasemonkey/99f14247b2/assets/images/icons/square/with-symbol/gray.svg" align="bottom"> Incorrect code
|
|
1716
1716
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-greasemonkey",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.4",
|
|
4
4
|
"description": "ESLint rules for Greasemonkey/Tampermonkey userscripts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@typescript-eslint/parser": "^8.72.1",
|
|
84
84
|
"@typescript-eslint/utils": "^8.72.1",
|
|
85
85
|
"eslint": "^10.14.0",
|
|
86
|
-
"eslint-plugin-constructors": "^1.7.
|
|
86
|
+
"eslint-plugin-constructors": "^1.7.2",
|
|
87
87
|
"eslint-plugin-eslint-plugin": "^7.6.2",
|
|
88
88
|
"eslint-plugin-import-x": "^4.18.0",
|
|
89
89
|
"eslint-plugin-n": "^18.5.0",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"eslint-plugin-regexp": "^3.3.3",
|
|
95
95
|
"eslint-plugin-security": "^4.2.1",
|
|
96
96
|
"eslint-plugin-sonarjs": "^4.2.2",
|
|
97
|
-
"eslint-plugin-woodpecker": "^1.1.
|
|
98
|
-
"oxlint": "^1.
|
|
97
|
+
"eslint-plugin-woodpecker": "^1.1.4",
|
|
98
|
+
"oxlint": "^1.92.0",
|
|
99
99
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
100
100
|
"typescript-latest": "npm:typescript@^7.0.2"
|
|
101
101
|
},
|
|
@@ -93,7 +93,7 @@ export default {
|
|
|
93
93
|
&& node.callee.property?.name == 'open'
|
|
94
94
|
&& node.callee.object?.type == 'Identifier'
|
|
95
95
|
&& xhrVars.has(node.callee.object.name)
|
|
96
|
-
) {
|
|
96
|
+
) {
|
|
97
97
|
const url = urlFromLiteral(node.arguments[1])
|
|
98
98
|
if (url) context.report({ node: node.arguments[1], messageId: 'insecureXHR', data: { url }})
|
|
99
99
|
} else if (node.callee.type == 'Identifier'
|