@nx/eslint 22.6.3 → 22.6.5
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": "22.6.
|
|
3
|
+
"version": "22.6.5",
|
|
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,14 +35,14 @@
|
|
|
35
35
|
"eslint": "^8.0.0 || ^9.0.0 || ^10.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nx/devkit": "22.6.
|
|
39
|
-
"@nx/js": "22.6.
|
|
38
|
+
"@nx/devkit": "22.6.5",
|
|
39
|
+
"@nx/js": "22.6.5",
|
|
40
40
|
"semver": "^7.6.3",
|
|
41
41
|
"tslib": "^2.3.0",
|
|
42
42
|
"typescript": "~5.9.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"nx": "22.6.
|
|
45
|
+
"nx": "22.6.5"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"@zkochan/js-yaml": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/eslint/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EAMd,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/eslint/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EAMd,MAAM,YAAY,CAAC;AAmBpB,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAqHD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,mBAAmB,CA0E1D,CAAC;AAEF,eAAO,MAAM,aAAa,oCAAc,CAAC"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -13,7 +13,6 @@ const workspace_context_1 = require("nx/src/utils/workspace-context");
|
|
|
13
13
|
const semver_1 = require("semver");
|
|
14
14
|
const config_file_1 = require("../utils/config-file");
|
|
15
15
|
const resolve_eslint_class_1 = require("../utils/resolve-eslint-class");
|
|
16
|
-
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
17
16
|
const DEFAULT_EXTENSIONS = [
|
|
18
17
|
'ts',
|
|
19
18
|
'cts',
|
|
@@ -39,7 +38,7 @@ function readTargetsCache(cachePath) {
|
|
|
39
38
|
function writeTargetsToCache(cachePath, results) {
|
|
40
39
|
(0, devkit_1.writeJsonFile)(cachePath, results);
|
|
41
40
|
}
|
|
42
|
-
const internalCreateNodesV2 = async (ESLint, configFilePath, options, context, projectRootsByEslintRoots, lintableFilesPerProjectRoot, projectsCache, hashByRoot) => {
|
|
41
|
+
const internalCreateNodesV2 = async (ESLint, configFilePath, options, context, projectRootsByEslintRoots, lintableFilesPerProjectRoot, projectsCache, hashByRoot, pmc) => {
|
|
43
42
|
const configDir = (0, posix_1.dirname)(configFilePath);
|
|
44
43
|
const eslintVersion = ESLint.version;
|
|
45
44
|
let sharedEslint;
|
|
@@ -78,7 +77,7 @@ const internalCreateNodesV2 = async (ESLint, configFilePath, options, context, p
|
|
|
78
77
|
projectsCache[hash] = {};
|
|
79
78
|
return;
|
|
80
79
|
}
|
|
81
|
-
const project = getProjectUsingESLintConfig(configFilePath, projectRoot, eslintVersion, options, context);
|
|
80
|
+
const project = getProjectUsingESLintConfig(configFilePath, projectRoot, eslintVersion, options, context, pmc);
|
|
82
81
|
if (project) {
|
|
83
82
|
projects[projectRoot] = project;
|
|
84
83
|
// Store project into the cache
|
|
@@ -97,6 +96,7 @@ exports.createNodes = [
|
|
|
97
96
|
ESLINT_CONFIG_GLOB_V2,
|
|
98
97
|
async (configFiles, options, context) => {
|
|
99
98
|
options = normalizeOptions(options);
|
|
99
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
|
|
100
100
|
const optionsHash = (0, file_hasher_1.hashObject)(options);
|
|
101
101
|
const cachePath = (0, posix_1.join)(cache_directory_1.workspaceDataDirectory, `eslint-${optionsHash}.hash`);
|
|
102
102
|
const targetsCache = readTargetsCache(cachePath);
|
|
@@ -121,7 +121,7 @@ exports.createNodes = [
|
|
|
121
121
|
const ESLint = await (0, resolve_eslint_class_1.resolveESLintClass)({
|
|
122
122
|
useFlatConfigOverrideVal: (0, config_file_1.isFlatConfig)(rootConfig ?? eslintConfigFiles[0]),
|
|
123
123
|
});
|
|
124
|
-
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => internalCreateNodesV2(ESLint, configFile, options, context, projectRootsByEslintRoots, lintableFilesPerProjectRoot, targetsCache, hashByRoot), eslintConfigFiles, options, context);
|
|
124
|
+
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => internalCreateNodesV2(ESLint, configFile, options, context, projectRootsByEslintRoots, lintableFilesPerProjectRoot, targetsCache, hashByRoot, pmc), eslintConfigFiles, options, context);
|
|
125
125
|
}
|
|
126
126
|
finally {
|
|
127
127
|
writeTargetsToCache(cachePath, targetsCache);
|
|
@@ -187,7 +187,7 @@ function getRootForDirectory(directory, roots) {
|
|
|
187
187
|
}
|
|
188
188
|
return roots.has(currentPath) ? currentPath : null;
|
|
189
189
|
}
|
|
190
|
-
function getProjectUsingESLintConfig(configFilePath, projectRoot, eslintVersion, options, context) {
|
|
190
|
+
function getProjectUsingESLintConfig(configFilePath, projectRoot, eslintVersion, options, context, pmc) {
|
|
191
191
|
const rootEslintConfig = [
|
|
192
192
|
config_file_1.baseEsLintConfigFile,
|
|
193
193
|
...config_file_1.BASE_ESLINT_CONFIG_FILENAMES,
|
|
@@ -212,10 +212,10 @@ function getProjectUsingESLintConfig(configFilePath, projectRoot, eslintVersion,
|
|
|
212
212
|
eslintConfigs.unshift(rootEslintConfig);
|
|
213
213
|
}
|
|
214
214
|
return {
|
|
215
|
-
targets: buildEslintTargets(eslintConfigs, eslintVersion, projectRoot, context.workspaceRoot, options, standaloneSrcPath),
|
|
215
|
+
targets: buildEslintTargets(eslintConfigs, eslintVersion, projectRoot, context.workspaceRoot, options, pmc, standaloneSrcPath),
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
function buildEslintTargets(eslintConfigs, eslintVersion, projectRoot, workspaceRoot, options, standaloneSrcPath) {
|
|
218
|
+
function buildEslintTargets(eslintConfigs, eslintVersion, projectRoot, workspaceRoot, options, pmc, standaloneSrcPath) {
|
|
219
219
|
const isRootProject = projectRoot === '.';
|
|
220
220
|
const targets = {};
|
|
221
221
|
const targetConfig = {
|