@open-xchange/linter-presets 1.13.0 → 1.14.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/CHANGELOG.md +8 -0
- package/dist/eslint/env/browser.d.ts +1 -0
- package/dist/eslint/env/browser.js +7 -3
- package/docs/eslint/env/browser.md +3 -1
- package/package.json +14 -13
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,7 @@ export interface EnvBrowserOptions extends EnvRestrictedOptions {
|
|
|
12
12
|
* Wraps the following packages:
|
|
13
13
|
* - `globals`
|
|
14
14
|
* - `confusing-browser-globals`
|
|
15
|
+
* - `eslint-plugin-no-unsanitized`
|
|
15
16
|
*
|
|
16
17
|
* @param envOptions
|
|
17
18
|
* Configuration options for the environment.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import JAVASCRIPT_GLOBALS from "globals";
|
|
2
2
|
import CONFUSING_BROWSER_GLOBALS from "confusing-browser-globals";
|
|
3
|
+
import sanitizedPlugin from "eslint-plugin-no-unsanitized";
|
|
3
4
|
import { createConfig, customRules } from "../shared/env-utils.js";
|
|
4
5
|
import { restrictedRulesConfig } from "../shared/restricted.js";
|
|
5
6
|
// constants ==================================================================
|
|
@@ -80,6 +81,7 @@ const RESTRICTED_GLOBALS = AMBIGUOUS_BROWSER_TYPES.map(name => {
|
|
|
80
81
|
* Wraps the following packages:
|
|
81
82
|
* - `globals`
|
|
82
83
|
* - `confusing-browser-globals`
|
|
84
|
+
* - `eslint-plugin-no-unsanitized`
|
|
83
85
|
*
|
|
84
86
|
* @param envOptions
|
|
85
87
|
* Configuration options for the environment.
|
|
@@ -90,18 +92,20 @@ const RESTRICTED_GLOBALS = AMBIGUOUS_BROWSER_TYPES.map(name => {
|
|
|
90
92
|
export default function browser(envOptions) {
|
|
91
93
|
return [
|
|
92
94
|
// register global symbols used in browser scripts
|
|
93
|
-
createConfig("
|
|
95
|
+
createConfig("env.browser.globals", envOptions, {
|
|
94
96
|
languageOptions: {
|
|
95
97
|
globals: BROWSER_GLOBALS,
|
|
96
98
|
},
|
|
97
99
|
}),
|
|
98
100
|
// generate the "no-restricted-?" rules according to passed configuration
|
|
99
|
-
restrictedRulesConfig("
|
|
101
|
+
restrictedRulesConfig("env.browser.restricted", envOptions, {
|
|
100
102
|
globals: RESTRICTED_GLOBALS,
|
|
101
103
|
properties: RESTRICTED_PROPERTIES,
|
|
102
104
|
syntax: RESTRICTED_SYNTAX,
|
|
103
105
|
}),
|
|
106
|
+
// register rule implementations and recommended rules
|
|
107
|
+
createConfig("env.browser.sanitized", envOptions, sanitizedPlugin.configs.recommended),
|
|
104
108
|
// custom rules
|
|
105
|
-
customRules("
|
|
109
|
+
customRules("env.browser.rules", envOptions),
|
|
106
110
|
];
|
|
107
111
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Environment `env.browser`
|
|
2
2
|
|
|
3
|
-
Creates configuration objects with global symbols and linter rules for modules running in the browser. Adds well-known [browser globals](https://github.com/sindresorhus/globals), and forbids [confusing browser globals](https://github.com/facebook/create-react-app/tree/main/packages/confusing-browser-globals).
|
|
3
|
+
Creates configuration objects with global symbols and linter rules for modules running in the browser. Adds well-known [browser globals](https://github.com/sindresorhus/globals), and forbids [confusing browser globals](https://github.com/facebook/create-react-app/tree/main/packages/confusing-browser-globals). Adds the following plugins and their recommended rules:
|
|
4
|
+
|
|
5
|
+
- [eslint-plugin-no-unsanitized](https://github.com/mozilla/eslint-plugin-no-unsanitized/)
|
|
4
6
|
|
|
5
7
|
## Signature
|
|
6
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/linter-presets",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"description": "Configuration presets for ESLint and StyleLint",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"@babel/eslint-parser": "^7.28.4",
|
|
35
35
|
"@babel/plugin-proposal-decorators": "^7.28.0",
|
|
36
36
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
37
|
-
"@eslint-react/eslint-plugin": "^2.2.
|
|
37
|
+
"@eslint-react/eslint-plugin": "^2.2.3",
|
|
38
38
|
"@eslint/compat": "^1.4.0",
|
|
39
|
-
"@eslint/config-helpers": "^0.4.
|
|
40
|
-
"@eslint/js": "^9.
|
|
41
|
-
"@eslint/markdown": "^7.
|
|
42
|
-
"@stylistic/eslint-plugin": "^5.
|
|
39
|
+
"@eslint/config-helpers": "^0.4.1",
|
|
40
|
+
"@eslint/js": "^9.38.0",
|
|
41
|
+
"@eslint/markdown": "^7.5.0",
|
|
42
|
+
"@stylistic/eslint-plugin": "^5.5.0",
|
|
43
43
|
"@stylistic/eslint-plugin-migrate": "^4.4.1",
|
|
44
44
|
"@stylistic/stylelint-config": "^3.0.1",
|
|
45
45
|
"@stylistic/stylelint-plugin": "^4.0.0",
|
|
46
46
|
"@types/picomatch": "^4.0.2",
|
|
47
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
47
|
+
"@vitest/eslint-plugin": "^1.3.23",
|
|
48
48
|
"confusing-browser-globals": "^1.0.11",
|
|
49
49
|
"empathic": "^2.0.0",
|
|
50
50
|
"eslint-plugin-chai-expect": "^3.1.0",
|
|
@@ -54,11 +54,12 @@
|
|
|
54
54
|
"eslint-plugin-jest": "^29.0.1",
|
|
55
55
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
56
56
|
"eslint-plugin-jest-extended": "^3.0.1",
|
|
57
|
-
"eslint-plugin-jsdoc": "^61.1.
|
|
57
|
+
"eslint-plugin-jsdoc": "^61.1.5",
|
|
58
58
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
59
59
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
60
60
|
"eslint-plugin-license-header": "^0.8.0",
|
|
61
61
|
"eslint-plugin-n": "^17.23.1",
|
|
62
|
+
"eslint-plugin-no-unsanitized": "^4.1.4",
|
|
62
63
|
"eslint-plugin-promise": "^7.2.1",
|
|
63
64
|
"eslint-plugin-react-hooks": "^7.0.0",
|
|
64
65
|
"eslint-plugin-react-hooks-static-deps": "^1.0.7",
|
|
@@ -75,16 +76,16 @@
|
|
|
75
76
|
"stylelint-config-standard-scss": "^16.0.0",
|
|
76
77
|
"stylelint-config-standard-vue": "^1.0.0",
|
|
77
78
|
"stylelint-plugin-license-header": "^1.0.3",
|
|
78
|
-
"typescript-eslint": "^8.46.
|
|
79
|
+
"typescript-eslint": "^8.46.2",
|
|
79
80
|
"vue-eslint-parser": "^10.2.0"
|
|
80
81
|
},
|
|
81
82
|
"devDependencies": {
|
|
82
83
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
83
84
|
"@types/eslint-scope": "^8.3.2",
|
|
84
|
-
"@types/node": "^24.
|
|
85
|
+
"@types/node": "^24.9.1",
|
|
85
86
|
"@types/react": "^19.2.2",
|
|
86
|
-
"@typescript-eslint/utils": "^8.46.
|
|
87
|
-
"eslint": "^9.
|
|
87
|
+
"@typescript-eslint/utils": "^8.46.2",
|
|
88
|
+
"eslint": "^9.38.0",
|
|
88
89
|
"jest": "^30.2.0",
|
|
89
90
|
"jiti": "^2.6.1",
|
|
90
91
|
"premove": "^4.0.0",
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
"postcss": "^8.4.0",
|
|
100
101
|
"stylelint": "^16.23.0",
|
|
101
102
|
"typescript": "^5.9.0",
|
|
102
|
-
"vitest": "^
|
|
103
|
+
"vitest": "^3.0.0 || ^4.0.0"
|
|
103
104
|
},
|
|
104
105
|
"peerDependenciesMeta": {
|
|
105
106
|
"eslint": {
|