@nx/eslint 23.0.0-beta.17 → 23.0.0-beta.18

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.
@@ -0,0 +1,33 @@
1
+ #### Update TypeScript ESLint to v8.13.0
2
+
3
+ Update TypeScript ESLint packages to v8.13.0 if they are already on v8
4
+
5
+ #### Sample Code Changes
6
+
7
+ This migration will update `typescript-eslint`, `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser` and `@typescript-eslint/utils` to `8.13.0` if they are between version `8.0.0` and `8.13.0`.
8
+
9
+ ##### Before
10
+
11
+ ```json title="package.json"
12
+ {
13
+ "devDependencies": {
14
+ "typescript-eslint": "^8.0.0",
15
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
16
+ "@typescript-eslint/parser": "^8.0.0",
17
+ "@typescript-eslint/utils": "^8.0.0"
18
+ }
19
+ }
20
+ ```
21
+
22
+ ##### After
23
+
24
+ ```json title="package.json"
25
+ {
26
+ "devDependencies": {
27
+ "typescript-eslint": "^8.13.0",
28
+ "@typescript-eslint/eslint-plugin": "^8.13.0",
29
+ "@typescript-eslint/parser": "^8.13.0",
30
+ "@typescript-eslint/utils": "^8.13.0"
31
+ }
32
+ }
33
+ ```
@@ -0,0 +1,83 @@
1
+ #### Update ESLint Config File Extensions in Overrides
2
+
3
+ Update ESLint flat config to include .cjs, .mjs, .cts, and .mts files in overrides (if needed)
4
+
5
+ #### Sample Code Changes
6
+
7
+ Add `.cjs`, `.mjs`, `.cts`, `.mts` file extensions to overrides converted using `convert-to-flat-config`
8
+
9
+ ##### Before
10
+
11
+ ```js title="eslint.config.js"
12
+ const { FlatCompat } = require('@eslint/eslintrc');
13
+ const js = require('@eslint/js');
14
+ const nxEslintPlugin = require('@nx/eslint-plugin');
15
+
16
+ const compat = new FlatCompat({
17
+ baseDirectory: __dirname,
18
+ recommendedConfig: js.configs.recommended,
19
+ });
20
+
21
+ module.exports = [
22
+ ...compat
23
+ .config({
24
+ extends: ['plugin:@nx/typescript'],
25
+ })
26
+ .map((config) => ({
27
+ ...config,
28
+ files: ['**/*.ts', '**/*.tsx'],
29
+ rules: {
30
+ ...config.rules,
31
+ },
32
+ })),
33
+ ...compat
34
+ .config({
35
+ extends: ['plugin:@nx/javascript'],
36
+ })
37
+ .map((config) => ({
38
+ ...config,
39
+ files: ['**/*.js', '**/*.jsx'],
40
+ rules: {
41
+ ...config.rules,
42
+ },
43
+ })),
44
+ ];
45
+ ```
46
+
47
+ ##### After
48
+
49
+ ```js title="eslint.config.js" {17,28}
50
+ const { FlatCompat } = require('@eslint/eslintrc');
51
+ const js = require('@eslint/js');
52
+ const nxEslintPlugin = require('@nx/eslint-plugin');
53
+
54
+ const compat = new FlatCompat({
55
+ baseDirectory: __dirname,
56
+ recommendedConfig: js.configs.recommended,
57
+ });
58
+
59
+ module.exports = [
60
+ ...compat
61
+ .config({
62
+ extends: ['plugin:@nx/typescript'],
63
+ })
64
+ .map((config) => ({
65
+ ...config,
66
+ files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
67
+ rules: {
68
+ ...config.rules,
69
+ },
70
+ })),
71
+ ...compat
72
+ .config({
73
+ extends: ['plugin:@nx/javascript'],
74
+ })
75
+ .map((config) => ({
76
+ ...config,
77
+ files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
78
+ rules: {
79
+ ...config.rules,
80
+ },
81
+ })),
82
+ ];
83
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/eslint",
3
- "version": "23.0.0-beta.17",
3
+ "version": "23.0.0-beta.18",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "files": [
@@ -73,17 +73,17 @@
73
73
  "peerDependencies": {
74
74
  "@zkochan/js-yaml": "0.0.7",
75
75
  "eslint": "^8.0.0 || ^9.0.0 || ^10.0.0",
76
- "@nx/jest": "23.0.0-beta.17"
76
+ "@nx/jest": "23.0.0-beta.18"
77
77
  },
78
78
  "dependencies": {
79
79
  "semver": "^7.6.3",
80
80
  "tslib": "^2.3.0",
81
81
  "typescript": "~5.9.2",
82
- "@nx/devkit": "23.0.0-beta.17",
83
- "@nx/js": "23.0.0-beta.17"
82
+ "@nx/devkit": "23.0.0-beta.18",
83
+ "@nx/js": "23.0.0-beta.18"
84
84
  },
85
85
  "devDependencies": {
86
- "nx": "23.0.0-beta.17"
86
+ "nx": "23.0.0-beta.18"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@nx/jest": {