@open-xchange/linter-presets 0.8.13 → 0.9.0
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 +5 -0
- package/dist/eslint/env/browser.js +1 -4
- package/doc/eslint/env/browser.md +0 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -34,14 +34,11 @@ const AMBIGUOUS_BROWSER_TYPES = [
|
|
|
34
34
|
/**
|
|
35
35
|
* Properties of global objects to be banned in all browser modules.
|
|
36
36
|
*/
|
|
37
|
-
const RESTRICTED_PROPERTIES = [
|
|
38
|
-
{ object: "Object", property: "hasOwn", message: "Missing browser support." },
|
|
39
|
-
];
|
|
37
|
+
const RESTRICTED_PROPERTIES = [];
|
|
40
38
|
/**
|
|
41
39
|
* Syntax constructs to be banned in all browser modules.
|
|
42
40
|
*/
|
|
43
41
|
const RESTRICTED_SYNTAX = [
|
|
44
|
-
{ selector: "ClassBody > StaticBlock", message: "Static blocks not supported yet." },
|
|
45
42
|
{ selector: "ExportNamedDeclaration > TSEnumDeclaration[const=true]", message: "Do not export const enums." },
|
|
46
43
|
];
|
|
47
44
|
// initialization =============================================================
|
|
@@ -42,11 +42,9 @@ The environment `env.browser` already defines the following built-in restriction
|
|
|
42
42
|
| Globals | [`isFinite`](https://devdocs.io/javascript/global_objects/isfinite) | Use [`Number.isFinite`](https://devdocs.io/javascript/global_objects/number/isfinite) instead. |
|
|
43
43
|
| | [`isNaN`](https://devdocs.io/javascript/global_objects/isnan) | Use [`Number.isNaN`](https://devdocs.io/javascript/global_objects/number/isnan) instead. |
|
|
44
44
|
| | [Confusing browser globals](https://github.com/facebook/create-react-app/tree/main/packages/confusing-browser-globals) | Globals such as `name` and `event` should not be used to catch typos in function parameters etc. |
|
|
45
|
-
| Properties | [`Object.hasOwn`](https://devdocs.io/javascript/global_objects/object/hasown) | Not yet supported by all browsers. |
|
|
46
45
|
| Syntax | TypeScript `public` class field modifier | Can be omitted (except for constructors of classes deriving from a class with protected constructor). |
|
|
47
46
|
| | TypeScript `private` class field modifier | Use native `#private` class fields. |
|
|
48
47
|
| | [TypeScript parameter properties](https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties) | Use explicit class properties. |
|
|
49
|
-
| | [Static class initialization blocks](https://www.typescriptlang.org/docs/handbook/2/classes.html#static-blocks-in-classes) | Not yet supported by all browsers. |
|
|
50
48
|
| | Module exports of [TypeScript const enumerations](https://devdocs.io/typescript~5.1/enums#enums-at-compile-time) | Not compatible with bundlers running in isolated modules mode (ESBuild). |
|
|
51
49
|
|
|
52
50
|
## Example
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/linter-presets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Configuration presets for ESLint and StyleLint",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"eslint-plugin-jest": "^28.9.0",
|
|
43
43
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
44
44
|
"eslint-plugin-jsdoc": "^50.4.3",
|
|
45
|
-
"eslint-plugin-jsonc": "^2.
|
|
45
|
+
"eslint-plugin-jsonc": "^2.17.0",
|
|
46
46
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
47
47
|
"eslint-plugin-jsx-expressions": "^1.3.2",
|
|
48
48
|
"eslint-plugin-license-header": "^0.6.1",
|
|
49
|
-
"eslint-plugin-n": "^17.
|
|
49
|
+
"eslint-plugin-n": "^17.13.1",
|
|
50
50
|
"eslint-plugin-promise": "^7.1.0",
|
|
51
51
|
"eslint-plugin-react": "^7.37.2",
|
|
52
52
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
@@ -55,18 +55,18 @@
|
|
|
55
55
|
"eslint-plugin-testing-library": "^6.4.0",
|
|
56
56
|
"eslint-plugin-yml": "^1.15.0",
|
|
57
57
|
"find-up": "^7.0.0",
|
|
58
|
-
"globals": "^15.
|
|
58
|
+
"globals": "^15.12.0",
|
|
59
59
|
"picomatch": "^4.0.2",
|
|
60
60
|
"stylelint-config-standard": "^36.0.1",
|
|
61
61
|
"stylelint-config-standard-less": "^3.0.1",
|
|
62
62
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
63
63
|
"stylelint-plugin-license-header": "^1.0.3",
|
|
64
|
-
"typescript-eslint": "^8.
|
|
64
|
+
"typescript-eslint": "^8.13.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
68
68
|
"@types/picomatch": "^3.0.1",
|
|
69
|
-
"@typescript-eslint/utils": "^8.
|
|
69
|
+
"@typescript-eslint/utils": "^8.13.0",
|
|
70
70
|
"eslint": "^9.14.0",
|
|
71
71
|
"jest": "^29.7.0",
|
|
72
72
|
"rimraf": "^6.0.1",
|