@nx/eslint 0.0.0-pr-28682-f05f746 → 0.0.0-pr-28706-f21dc7c
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-
|
|
3
|
+
"version": "0.0.0-pr-28706-f21dc7c",
|
|
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-
|
|
39
|
-
"@nx/js": "0.0.0-pr-
|
|
38
|
+
"@nx/devkit": "0.0.0-pr-28706-f21dc7c",
|
|
39
|
+
"@nx/js": "0.0.0-pr-28706-f21dc7c",
|
|
40
40
|
"semver": "^7.5.3",
|
|
41
41
|
"tslib": "^2.3.0",
|
|
42
42
|
"typescript": "~5.4.2"
|
|
@@ -71,7 +71,8 @@ function migrateConfigToMonorepoStyle(projects, tree, unitTestRunner, keepExisti
|
|
|
71
71
|
}
|
|
72
72
|
function findLintTarget(project) {
|
|
73
73
|
return Object.values(project.targets ?? {}).find((target) => target.executor === '@nx/eslint:lint' ||
|
|
74
|
-
target.executor === '@nx/linter:eslint'
|
|
74
|
+
target.executor === '@nx/linter:eslint' ||
|
|
75
|
+
target.executor === '@nrwl/linter:eslint');
|
|
75
76
|
}
|
|
76
77
|
function migrateEslintFile(projectEslintPath, tree) {
|
|
77
78
|
const baseFile = (0, eslint_file_1.findEslintFile)(tree);
|
|
@@ -87,6 +88,8 @@ function migrateEslintFile(projectEslintPath, tree) {
|
|
|
87
88
|
config = (0, ast_utils_1.removeCompatExtends)(config, [
|
|
88
89
|
'plugin:@nx/typescript',
|
|
89
90
|
'plugin:@nx/javascript',
|
|
91
|
+
'plugin:@nrwl/typescript',
|
|
92
|
+
'plugin:@nrwl/javascript',
|
|
90
93
|
]);
|
|
91
94
|
config = (0, ast_utils_1.removePredefinedConfigs)(config, '@nx/eslint-plugin', 'nx', [
|
|
92
95
|
'flat/base',
|
|
@@ -101,7 +104,7 @@ function migrateEslintFile(projectEslintPath, tree) {
|
|
|
101
104
|
delete json.root;
|
|
102
105
|
// remove nrwl/nx plugins
|
|
103
106
|
if (json.plugins) {
|
|
104
|
-
json.plugins = json.plugins.filter((p) => p !== '@nx');
|
|
107
|
+
json.plugins = json.plugins.filter((p) => p !== '@nx' && p !== '@nrwl/nx');
|
|
105
108
|
if (json.plugins.length === 0) {
|
|
106
109
|
delete json.plugins;
|
|
107
110
|
}
|
|
@@ -121,7 +124,9 @@ function migrateEslintFile(projectEslintPath, tree) {
|
|
|
121
124
|
json.overrides.forEach((override) => {
|
|
122
125
|
if (override.extends) {
|
|
123
126
|
override.extends = override.extends.filter((ext) => ext !== 'plugin:@nx/typescript' &&
|
|
124
|
-
ext !== 'plugin:@nx/
|
|
127
|
+
ext !== 'plugin:@nrwl/nx/typescript' &&
|
|
128
|
+
ext !== 'plugin:@nx/javascript' &&
|
|
129
|
+
ext !== 'plugin:@nrwl/nx/javascript');
|
|
125
130
|
if (override.extends.length === 0) {
|
|
126
131
|
delete override.extends;
|
|
127
132
|
}
|
|
@@ -223,7 +223,7 @@ function isMigrationToMonorepoNeeded(tree, graph) {
|
|
|
223
223
|
return false;
|
|
224
224
|
}
|
|
225
225
|
for (const targetConfig of Object.values(rootProject.data.targets ?? {})) {
|
|
226
|
-
if (['@nx/eslint:lint', '@nx/linter:eslint'].includes(targetConfig.executor) ||
|
|
226
|
+
if (['@nx/eslint:lint', '@nrwl/linter:eslint', '@nx/linter:eslint'].includes(targetConfig.executor) ||
|
|
227
227
|
(targetConfig.executor === 'nx:run-commands' &&
|
|
228
228
|
targetConfig.options?.command &&
|
|
229
229
|
targetConfig.options?.command.startsWith('eslint '))) {
|