@nx/eslint 18.1.0-beta.1 → 18.1.0-beta.3
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": "18.1.0-beta.
|
3
|
+
"version": "18.1.0-beta.3",
|
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": {
|
@@ -33,12 +33,12 @@
|
|
33
33
|
"js-yaml": "4.1.0"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
-
"@nx/devkit": "18.1.0-beta.
|
37
|
-
"@nx/js": "18.1.0-beta.
|
36
|
+
"@nx/devkit": "18.1.0-beta.3",
|
37
|
+
"@nx/js": "18.1.0-beta.3",
|
38
38
|
"eslint": "^8.0.0",
|
39
39
|
"tslib": "^2.3.0",
|
40
40
|
"typescript": "~5.3.2",
|
41
|
-
"@nx/linter": "18.1.0-beta.
|
41
|
+
"@nx/linter": "18.1.0-beta.3"
|
42
42
|
},
|
43
43
|
"peerDependenciesMeta": {
|
44
44
|
"js-yaml": {
|
@@ -50,7 +50,10 @@ function addPlugin(tree) {
|
|
50
50
|
(0, devkit_1.updateNxJson)(tree, nxJson);
|
51
51
|
}
|
52
52
|
async function initEsLint(tree, options) {
|
53
|
-
|
53
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
54
|
+
const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
|
55
|
+
nxJson.useInferencePlugins !== false;
|
56
|
+
options.addPlugin ??= addPluginDefault;
|
54
57
|
const hasPlugin = (0, plugin_2.hasEslintPlugin)(tree);
|
55
58
|
const rootEslintFile = (0, eslint_file_1.findEslintFile)(tree);
|
56
59
|
if (rootEslintFile && options.addPlugin && !hasPlugin) {
|
@@ -17,7 +17,10 @@ function lintProjectGenerator(tree, options) {
|
|
17
17
|
}
|
18
18
|
exports.lintProjectGenerator = lintProjectGenerator;
|
19
19
|
async function lintProjectGeneratorInternal(tree, options) {
|
20
|
-
|
20
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
21
|
+
const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
|
22
|
+
nxJson.useInferencePlugins !== false;
|
23
|
+
options.addPlugin ??= addPluginDefault;
|
21
24
|
const tasks = [];
|
22
25
|
const initTask = await (0, init_1.lintInitGenerator)(tree, {
|
23
26
|
skipPackageJson: options.skipPackageJson,
|
@@ -8,8 +8,13 @@ const ts = require("typescript");
|
|
8
8
|
const workspace_lint_rules_1 = require("../../utils/workspace-lint-rules");
|
9
9
|
const workspace_rules_project_1 = require("../workspace-rules-project/workspace-rules-project");
|
10
10
|
async function lintWorkspaceRuleGenerator(tree, options) {
|
11
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
11
12
|
// Ensure that the workspace rules project has been created
|
12
|
-
const projectGeneratorCallback = await (0, workspace_rules_project_1.lintWorkspaceRulesProjectGenerator)(tree, {
|
13
|
+
const projectGeneratorCallback = await (0, workspace_rules_project_1.lintWorkspaceRulesProjectGenerator)(tree, {
|
14
|
+
skipFormat: true,
|
15
|
+
addPlugin: process.env.NX_ADD_PLUGINS !== 'false' &&
|
16
|
+
nxJson.useInferencePlugins !== false,
|
17
|
+
});
|
13
18
|
const ruleDir = (0, devkit_1.joinPathFragments)(workspace_lint_rules_1.workspaceLintPluginDir, options.directory ?? '');
|
14
19
|
// Generate the required files for the new rule
|
15
20
|
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), ruleDir, {
|