@nx/eslint 20.2.0-canary.20241114-08953af → 20.2.0-canary.20241116-8efad63
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +3 -3
- package/src/generators/init/init.js +14 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/eslint",
|
3
|
-
"version": "20.2.0-canary.
|
3
|
+
"version": "20.2.0-canary.20241116-8efad63",
|
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": "20.2.0-canary.
|
39
|
-
"@nx/js": "20.2.0-canary.
|
38
|
+
"@nx/devkit": "20.2.0-canary.20241116-8efad63",
|
39
|
+
"@nx/js": "20.2.0-canary.20241116-8efad63",
|
40
40
|
"semver": "^7.5.3",
|
41
41
|
"tslib": "^2.3.0",
|
42
42
|
"typescript": "~5.4.2"
|
@@ -32,6 +32,19 @@ function addTargetDefaults(tree) {
|
|
32
32
|
];
|
33
33
|
(0, devkit_1.updateNxJson)(tree, nxJson);
|
34
34
|
}
|
35
|
+
function updateVsCodeRecommendedExtensions(host) {
|
36
|
+
if (!host.exists('.vscode/extensions.json')) {
|
37
|
+
return;
|
38
|
+
}
|
39
|
+
(0, devkit_1.updateJson)(host, '.vscode/extensions.json', (json) => {
|
40
|
+
json.recommendations = json.recommendations || [];
|
41
|
+
const extension = 'dbaeumer.vscode-eslint';
|
42
|
+
if (!json.recommendations.includes(extension)) {
|
43
|
+
json.recommendations.push(extension);
|
44
|
+
}
|
45
|
+
return json;
|
46
|
+
});
|
47
|
+
}
|
35
48
|
async function initEsLint(tree, options) {
|
36
49
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
37
50
|
const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
|
@@ -58,6 +71,7 @@ async function initEsLint(tree, options) {
|
|
58
71
|
return () => { };
|
59
72
|
}
|
60
73
|
updateProductionFileset(tree);
|
74
|
+
updateVsCodeRecommendedExtensions(tree);
|
61
75
|
if (options.addPlugin) {
|
62
76
|
await (0, add_plugin_1.addPlugin)(tree, graph, '@nx/eslint/plugin', plugin_1.createNodesV2, {
|
63
77
|
targetName: lintTargetNames,
|