@nx/eslint 0.0.0-pr-3-e51e28c → 0.0.0-pr-30418-0e58904

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/migrations.json CHANGED
@@ -104,6 +104,18 @@
104
104
  },
105
105
  "@typescript-eslint/utils": {
106
106
  "version": "^7.16.0"
107
+ },
108
+ "@typescript-eslint/rule-tester": {
109
+ "version": "^7.16.0",
110
+ "alwaysAddToPackageJson": false
111
+ },
112
+ "@typescript-eslint/scope-manager": {
113
+ "version": "^7.16.0",
114
+ "alwaysAddToPackageJson": false
115
+ },
116
+ "@typescript-eslint/typescript-estree": {
117
+ "version": "^7.16.0",
118
+ "alwaysAddToPackageJson": false
107
119
  }
108
120
  }
109
121
  },
@@ -116,14 +128,26 @@
116
128
  "typescript-eslint": {
117
129
  "version": "^8.19.0"
118
130
  },
119
- "@typescript-eslint/parser": {
131
+ "@typescript-eslint/eslint-plugin": {
120
132
  "version": "^8.19.0"
121
133
  },
122
- "@typescript-eslint/eslint-plugin": {
134
+ "@typescript-eslint/parser": {
123
135
  "version": "^8.19.0"
124
136
  },
125
137
  "@typescript-eslint/utils": {
126
138
  "version": "^8.19.0"
139
+ },
140
+ "@typescript-eslint/rule-tester": {
141
+ "version": "^8.19.0",
142
+ "alwaysAddToPackageJson": false
143
+ },
144
+ "@typescript-eslint/scope-manager": {
145
+ "version": "^8.19.0",
146
+ "alwaysAddToPackageJson": false
147
+ },
148
+ "@typescript-eslint/typescript-estree": {
149
+ "version": "^8.19.0",
150
+ "alwaysAddToPackageJson": false
127
151
  }
128
152
  }
129
153
  },
@@ -136,14 +160,26 @@
136
160
  "typescript-eslint": {
137
161
  "version": "^8.19.0"
138
162
  },
139
- "@typescript-eslint/parser": {
163
+ "@typescript-eslint/eslint-plugin": {
140
164
  "version": "^8.19.0"
141
165
  },
142
- "@typescript-eslint/eslint-plugin": {
166
+ "@typescript-eslint/parser": {
143
167
  "version": "^8.19.0"
144
168
  },
145
169
  "@typescript-eslint/utils": {
146
170
  "version": "^8.19.0"
171
+ },
172
+ "@typescript-eslint/rule-tester": {
173
+ "version": "^8.19.0",
174
+ "alwaysAddToPackageJson": false
175
+ },
176
+ "@typescript-eslint/scope-manager": {
177
+ "version": "^8.19.0",
178
+ "alwaysAddToPackageJson": false
179
+ },
180
+ "@typescript-eslint/typescript-estree": {
181
+ "version": "^8.19.0",
182
+ "alwaysAddToPackageJson": false
147
183
  }
148
184
  }
149
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/eslint",
3
- "version": "0.0.0-pr-3-e51e28c",
3
+ "version": "0.0.0-pr-30418-0e58904",
4
4
  "private": false,
5
5
  "description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "eslint": "^8.0.0 || ^9.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@nx/devkit": "0.0.0-pr-3-e51e28c",
39
- "@nx/js": "0.0.0-pr-3-e51e28c",
38
+ "@nx/devkit": "0.0.0-pr-30418-0e58904",
39
+ "@nx/js": "0.0.0-pr-30418-0e58904",
40
40
  "semver": "^7.5.3",
41
41
  "tslib": "^2.3.0",
42
42
  "typescript": "~5.7.2"
@@ -12,6 +12,7 @@ const flat_config_1 = require("../../utils/flat-config");
12
12
  const ast_utils_1 = require("../utils/flat-config/ast-utils");
13
13
  const config_file_1 = require("../../utils/config-file");
14
14
  const plugin_1 = require("../utils/plugin");
15
+ const versions_1 = require("../../utils/versions");
15
16
  const setup_root_eslint_1 = require("./setup-root-eslint");
16
17
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
17
18
  function lintProjectGenerator(tree, options) {
@@ -96,7 +97,12 @@ async function lintProjectGeneratorInternal(tree, options) {
96
97
  // additionally, the companion e2e app would have `rootProject: true`
97
98
  // so we need to check for the root path as well
98
99
  if (!options.rootProject || projectConfig.root !== '.') {
99
- createEsLintConfiguration(tree, options, projectConfig, options.setParserOptionsProject, options.rootProject);
100
+ const addDependencyChecks = options.addPackageJsonDependencyChecks ||
101
+ isBuildableLibraryProject(tree, projectConfig);
102
+ createEsLintConfiguration(tree, options, projectConfig, options.setParserOptionsProject, options.rootProject, addDependencyChecks);
103
+ if (addDependencyChecks) {
104
+ tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, { 'jsonc-eslint-parser': versions_1.jsoncEslintParserVersion }, undefined, true));
105
+ }
100
106
  }
101
107
  // Buildable libs need source analysis enabled for linting `package.json`.
102
108
  if (isBuildableLibraryProject(tree, projectConfig) &&
@@ -114,7 +120,7 @@ async function lintProjectGeneratorInternal(tree, options) {
114
120
  }
115
121
  return (0, devkit_1.runTasksInSerial)(...tasks);
116
122
  }
117
- function createEsLintConfiguration(tree, options, projectConfig, setParserOptionsProject, rootProject) {
123
+ function createEsLintConfiguration(tree, options, projectConfig, setParserOptionsProject, rootProject, addDependencyChecks) {
118
124
  // we are only extending root for non-standalone projects or their complementary e2e apps
119
125
  const extendedRootConfig = rootProject ? undefined : (0, eslint_file_1.findEslintFile)(tree);
120
126
  const pathToRootConfig = extendedRootConfig
@@ -132,8 +138,6 @@ function createEsLintConfiguration(tree, options, projectConfig, setParserOption
132
138
  options.eslintConfigFormat = (0, eslint_file_1.determineEslintConfigFormat)(tree.read(extendedRootConfig, 'utf-8'));
133
139
  }
134
140
  }
135
- const addDependencyChecks = options.addPackageJsonDependencyChecks ||
136
- isBuildableLibraryProject(tree, projectConfig);
137
141
  const overrides = (0, flat_config_1.useFlatConfig)(tree)
138
142
  ? // For flat configs, we don't need to generate different overrides for each file. Users should add their own overrides as needed.
139
143
  []
@@ -3,6 +3,7 @@ export declare const eslintVersion = "~8.57.0";
3
3
  export declare const eslintrcVersion = "^2.1.1";
4
4
  export declare const eslintConfigPrettierVersion = "^9.0.0";
5
5
  export declare const typescriptESLintVersion = "^7.16.0";
6
+ export declare const jsoncEslintParserVersion = "^2.1.0";
6
7
  export declare const eslint9__typescriptESLintVersion = "^8.19.0";
7
8
  export declare const eslint9__eslintVersion = "^9.8.0";
8
9
  export declare const eslintCompat = "^1.1.1";
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eslintCompat = exports.eslint9__eslintVersion = exports.eslint9__typescriptESLintVersion = exports.typescriptESLintVersion = exports.eslintConfigPrettierVersion = exports.eslintrcVersion = exports.eslintVersion = exports.nxVersion = void 0;
3
+ exports.eslintCompat = exports.eslint9__eslintVersion = exports.eslint9__typescriptESLintVersion = exports.jsoncEslintParserVersion = exports.typescriptESLintVersion = exports.eslintConfigPrettierVersion = exports.eslintrcVersion = exports.eslintVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
5
  exports.eslintVersion = '~8.57.0';
6
6
  exports.eslintrcVersion = '^2.1.1';
7
7
  exports.eslintConfigPrettierVersion = '^9.0.0';
8
8
  exports.typescriptESLintVersion = '^7.16.0';
9
+ exports.jsoncEslintParserVersion = '^2.1.0';
9
10
  // Updated linting stack for ESLint v9, typescript-eslint v8
10
11
  exports.eslint9__typescriptESLintVersion = '^8.19.0';
11
12
  exports.eslint9__eslintVersion = '^9.8.0';