@open-xchange/linter-presets 0.8.12 → 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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## `0.9.0` – 2024-Nov-08
4
+
5
+ - change: (ESLint) allow static class initialization blocks
6
+ - change: (ESLint) allow `Object.hasOwn()`
7
+
8
+ ## `0.8.13` – 2024-Nov-08
9
+
10
+ - chore: bump dependencies
11
+
3
12
  ## `0.8.12` – 2024-Nov-02
4
13
 
5
14
  - fix: (ESLint) `@typescript-eslint/switch-exhaustiveness-check`: add option `considerDefaultExhaustiveForUnions`
@@ -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 =============================================================
@@ -26,7 +26,7 @@ Generates standard configuration targeting the source files in the entire projec
26
26
  #### `configure` Signature
27
27
 
28
28
  ```ts
29
- function configure(options?: ConfigureOptions): Linter.FlatConfig[]
29
+ function configure(options?: ConfigureOptions): Linter.Config[]
30
30
  ```
31
31
 
32
32
  #### `configure` Options
@@ -5,7 +5,7 @@ Creates configuration objects with global symbols and linter rules for modules r
5
5
  ## Signature
6
6
 
7
7
  ```ts
8
- function browser(options: EnvBrowserOptions): Linter.FlatConfig[]
8
+ function browser(options: EnvBrowserOptions): Linter.Config[]
9
9
  ```
10
10
 
11
11
  ## Options
@@ -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
@@ -8,7 +8,7 @@ Creates configuration objects with global symbols and linter rules for E2E tests
8
8
  ## Signature
9
9
 
10
10
  ```ts
11
- function codecept(options: EnvCodeceptOptions): Linter.FlatConfig[]
11
+ function codecept(options: EnvCodeceptOptions): Linter.Config[]
12
12
  ```
13
13
 
14
14
  ## Options
@@ -5,7 +5,7 @@ Creates configuration objects with linter rules for implementing custom ESlint p
5
5
  ## Signature
6
6
 
7
7
  ```ts
8
- function plugin(options: EnvEslintOptions): Linter.FlatConfig[]
8
+ function plugin(options: EnvEslintOptions): Linter.Config[]
9
9
  ```
10
10
 
11
11
  ## Options
@@ -9,7 +9,7 @@ Creates configuration objects with global symbols and linter rules for unit test
9
9
  ## Signature
10
10
 
11
11
  ```ts
12
- function jest(options: EnvJestOptions): Linter.FlatConfig[]
12
+ function jest(options: EnvJestOptions): Linter.Config[]
13
13
  ```
14
14
 
15
15
  ## Options
@@ -5,7 +5,7 @@ Creates configuration objects with global symbols and linter rules for NodeJS mo
5
5
  ## Signature
6
6
 
7
7
  ```ts
8
- function node(options: EnvNodeOptions): Linter.FlatConfig[]
8
+ function node(options: EnvNodeOptions): Linter.Config[]
9
9
  ```
10
10
 
11
11
  ## Options
@@ -11,7 +11,7 @@ Creates configuration objects for custom project setup and module imports.
11
11
  ## Signature
12
12
 
13
13
  ```ts
14
- function project(options: EnvProjectOptions): Linter.FlatConfig[]
14
+ function project(options: EnvProjectOptions): Linter.Config[]
15
15
  ```
16
16
 
17
17
  ## Options
@@ -12,7 +12,7 @@ Creates configuration objects with linter rules for ReactJS. Adds the following
12
12
  ## Signature
13
13
 
14
14
  ```ts
15
- function react(options: EnvReactOptions): Linter.FlatConfig[]
15
+ function react(options: EnvReactOptions): Linter.Config[]
16
16
  ```
17
17
 
18
18
  ## Options
@@ -7,7 +7,7 @@ Usually, this environment preset should not be necessary, as the new [project se
7
7
  ## Signature
8
8
 
9
9
  ```ts
10
- function tsconfig(options: EnvTSConfigOptions): Linter.FlatConfig[]
10
+ function tsconfig(options: EnvTSConfigOptions): Linter.Config[]
11
11
  ```
12
12
 
13
13
  ## Options
@@ -9,7 +9,7 @@ Creates configuration objects with global symbols and linter rules for unit test
9
9
  ## Signature
10
10
 
11
11
  ```ts
12
- function vitest(options: EnvVitestOptions): Linter.FlatConfig[]
12
+ function vitest(options: EnvVitestOptions): Linter.Config[]
13
13
  ```
14
14
 
15
15
  ## Options
@@ -17,7 +17,7 @@ Generates standard configuration targeting the source files in the entire projec
17
17
 
18
18
  #### `configure` Signature
19
19
 
20
- `function configure(options?: ConfigureOptions): Linter.FlatConfig[]`
20
+ `function configure(options?: ConfigureOptions): Linter.Config[]`
21
21
 
22
22
  #### `configure` Options
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xchange/linter-presets",
3
- "version": "0.8.12",
3
+ "version": "0.9.0",
4
4
  "description": "Configuration presets for ESLint and StyleLint",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,14 +39,14 @@
39
39
  "eslint-plugin-codeceptjs": "^1.3.0",
40
40
  "eslint-plugin-eslint-plugin": "^6.3.1",
41
41
  "eslint-plugin-import": "^2.31.0",
42
- "eslint-plugin-jest": "^28.8.3",
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.16.0",
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.12.0",
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.11.0",
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.12.2"
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.12.2",
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",