@nx/eslint 0.0.0-pr-29771-5e92bcc → 0.0.0-pr-29750-cc9549c

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/eslint",
3
- "version": "0.0.0-pr-29771-5e92bcc",
3
+ "version": "0.0.0-pr-29750-cc9549c",
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-29771-5e92bcc",
39
- "@nx/js": "0.0.0-pr-29771-5e92bcc",
38
+ "@nx/devkit": "0.0.0-pr-29750-cc9549c",
39
+ "@nx/js": "0.0.0-pr-29750-cc9549c",
40
40
  "semver": "^7.5.3",
41
41
  "tslib": "^2.3.0",
42
42
  "typescript": "~5.7.2"
@@ -13,7 +13,6 @@ 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
15
  const setup_root_eslint_1 = require("./setup-root-eslint");
16
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
17
16
  function lintProjectGenerator(tree, options) {
18
17
  return lintProjectGeneratorInternal(tree, { addPlugin: false, ...options });
19
18
  }
@@ -45,7 +44,7 @@ async function lintProjectGeneratorInternal(tree, options) {
45
44
  if (lintFilePatterns &&
46
45
  lintFilePatterns.length &&
47
46
  !lintFilePatterns.includes('{projectRoot}') &&
48
- isBuildableLibraryProject(tree, projectConfig)) {
47
+ isBuildableLibraryProject(projectConfig)) {
49
48
  lintFilePatterns.push(`{projectRoot}/package.json`);
50
49
  }
51
50
  const hasPlugin = (0, plugin_1.hasEslintPlugin)(tree);
@@ -99,7 +98,7 @@ async function lintProjectGeneratorInternal(tree, options) {
99
98
  createEsLintConfiguration(tree, options, projectConfig, options.setParserOptionsProject, options.rootProject);
100
99
  }
101
100
  // Buildable libs need source analysis enabled for linting `package.json`.
102
- if (isBuildableLibraryProject(tree, projectConfig) &&
101
+ if (isBuildableLibraryProject(projectConfig) &&
103
102
  !isJsAnalyzeSourceFilesEnabled(tree)) {
104
103
  (0, devkit_1.updateJson)(tree, 'nx.json', (json) => {
105
104
  json.pluginsConfig ??= {};
@@ -133,7 +132,7 @@ function createEsLintConfiguration(tree, options, projectConfig, setParserOption
133
132
  }
134
133
  }
135
134
  const addDependencyChecks = options.addPackageJsonDependencyChecks ||
136
- isBuildableLibraryProject(tree, projectConfig);
135
+ isBuildableLibraryProject(projectConfig);
137
136
  const overrides = (0, flat_config_1.useFlatConfig)(tree)
138
137
  ? // For flat configs, we don't need to generate different overrides for each file. Users should add their own overrides as needed.
139
138
  []
@@ -217,9 +216,8 @@ function isJsAnalyzeSourceFilesEnabled(tree) {
217
216
  return (jsPluginConfig?.analyzeSourceFiles ??
218
217
  nxJson.extends !== 'nx/presets/npm.json');
219
218
  }
220
- function isBuildableLibraryProject(tree, projectConfig) {
221
- return ((0, ts_solution_setup_1.getProjectType)(tree, projectConfig.root, projectConfig.projectType) ===
222
- 'library' &&
219
+ function isBuildableLibraryProject(projectConfig) {
220
+ return (projectConfig.projectType === 'library' &&
223
221
  projectConfig.targets?.build &&
224
222
  !!projectConfig.targets.build);
225
223
  }
@@ -5,7 +5,6 @@ exports.lintWorkspaceRulesProjectGenerator = lintWorkspaceRulesProjectGenerator;
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const js_1 = require("@nx/js");
7
7
  const add_swc_dependencies_1 = require("@nx/js/src/utils/swc/add-swc-dependencies");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
8
  const path_1 = require("path");
10
9
  const versions_1 = require("../../utils/versions");
11
10
  const workspace_lint_rules_1 = require("../../utils/workspace-lint-rules");
@@ -48,7 +47,7 @@ async function lintWorkspaceRulesProjectGenerator(tree, options = {}) {
48
47
  supportTsx: false,
49
48
  skipSerializers: true,
50
49
  setupFile: 'none',
51
- compiler: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree) ? 'swc' : 'tsc',
50
+ compiler: 'tsc',
52
51
  skipFormat: true,
53
52
  }));
54
53
  (0, devkit_1.updateJson)(tree, (0, path_1.join)(workspace_lint_rules_1.workspaceLintPluginDir, 'tsconfig.spec.json'), (json) => {