eslint-plugin-greasemonkey 1.10.2 → 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 CHANGED
@@ -33,7 +33,7 @@ npm i -D eslint-plugin-greasemonkey
33
33
  Usage
34
34
  </h2>
35
35
 
36
- ### <img height=15 width=auto src="https://www.google.com/s2/favicons?domain=eslint.org&sz=64"> ESLint
36
+ ### <img width=15 src="https://www.google.com/s2/favicons?domain=eslint.org&sz=64"> ESLint
37
37
 
38
38
  Add a bundled config to your `eslint.config.*js`:
39
39
 
@@ -58,7 +58,7 @@ export default [
58
58
 
59
59
  ---
60
60
 
61
- ### <img height=15 width=auto src="https://www.google.com/s2/favicons?domain=oxc.rs&sz=64"> Oxlint
61
+ ### <img width=15 src="https://www.google.com/s2/favicons?domain=oxc.rs&sz=64"> Oxlint
62
62
 
63
63
  Add a bundled config to your `oxlint.config.*ts`:
64
64
 
@@ -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 – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.5.0">v1.5.0</a>]
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 – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
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 – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.2.0">v1.2.0</a>]
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 – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.2.0">v1.2.0</a>]
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 – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
620
- - `allowedHeaders` (default `[]`) – additional headers to allow (strings or regexes), as a single value or array – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
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']`) – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
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 – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
1399
- - `requireMatchOrInclude` (default `true`) – require `@match` or `@include` – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
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 – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.5.0">v1.5.0</a>]
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'`) – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
1712
- - `allowFutureDate` (default `false`) – allow `@version` dates later than the current date – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
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) – [since <a target="_blank" href="https://codeberg.org/adamlui/eslint-plugin-greasemonkey/releases/tag/v1.0.0">v1.0.0</a>]
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.2",
3
+ "version": "1.10.4",
4
4
  "description": "ESLint rules for Greasemonkey/Tampermonkey userscripts",
5
5
  "keywords": [
6
6
  "eslint",
@@ -60,6 +60,17 @@
60
60
  "lint:all": "pre-commit run --all-files",
61
61
  "test": "node tests/run"
62
62
  },
63
+ "overrides": {
64
+ "@eslint/config-array": {
65
+ "minimatch": "^11.0.5"
66
+ },
67
+ "@typescript-eslint/typescript-estree": {
68
+ "minimatch": "^11.0.5"
69
+ },
70
+ "eslint-plugin-sonarjs": {
71
+ "minimatch": "^11.0.5"
72
+ }
73
+ },
63
74
  "dependencies": {
64
75
  "spdx-license-ids": "^3.0.24",
65
76
  "spdx-license-list": "^6.12.0"
@@ -69,20 +80,22 @@
69
80
  "@eslint/json": "^2.1.1",
70
81
  "@eslint/markdown": "^7.5.1",
71
82
  "@stylistic/eslint-plugin": "^5.10.0",
83
+ "@typescript-eslint/parser": "^8.72.1",
84
+ "@typescript-eslint/utils": "^8.72.1",
72
85
  "eslint": "^10.14.0",
73
- "eslint-plugin-constructors": "^1.7.0",
86
+ "eslint-plugin-constructors": "^1.7.2",
74
87
  "eslint-plugin-eslint-plugin": "^7.6.2",
75
- "eslint-plugin-import-x": "^4.17.1",
88
+ "eslint-plugin-import-x": "^4.18.0",
76
89
  "eslint-plugin-n": "^18.5.0",
77
90
  "eslint-plugin-no-secrets": "^2.3.3",
78
91
  "eslint-plugin-no-unsanitized": "^4.1.5",
79
- "eslint-plugin-package-json": "^1.12.0",
92
+ "eslint-plugin-package-json": "^1.14.0",
80
93
  "eslint-plugin-promise": "^7.3.0",
81
- "eslint-plugin-regexp": "^3.3.2",
94
+ "eslint-plugin-regexp": "^3.3.3",
82
95
  "eslint-plugin-security": "^4.2.1",
83
96
  "eslint-plugin-sonarjs": "^4.2.2",
84
- "eslint-plugin-woodpecker": "^1.1.2",
85
- "oxlint": "^1.90.0",
97
+ "eslint-plugin-woodpecker": "^1.1.4",
98
+ "oxlint": "^1.92.0",
86
99
  "typescript": "npm:@typescript/typescript6@^6.0.2",
87
100
  "typescript-latest": "npm:typescript@^7.0.2"
88
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
- ) { // xhr.open('GET', 'http://…')
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'