@nrwl/linter 15.0.0-beta.0 → 15.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1 -1
- package/migrations.json +6 -0
- package/package.json +5 -5
- package/src/executors/lint/schema.json +5 -3
- package/src/migrations/update-15-0-0/add-eslint-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-eslint-inputs.js +39 -0
- package/src/migrations/update-15-0-0/add-eslint-inputs.js.map +1 -0
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,6 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
-
# [15.0.0-beta.
|
6
|
+
# [15.0.0-beta.1](https://github.com/nrwl/nx/compare/14.8.0...15.0.0-beta.1) (2022-10-05)
|
7
7
|
|
8
8
|
**Note:** Version bump only for package @nrwl/linter
|
package/migrations.json
CHANGED
@@ -88,6 +88,12 @@
|
|
88
88
|
"version": "14.4.4",
|
89
89
|
"description": "Switch from @typescript-eslint/experimental-utils to @typescript-eslint/utils in all rules and rules.spec files",
|
90
90
|
"factory": "./src/migrations/update-14-4-4/experimental-to-utils-rules"
|
91
|
+
},
|
92
|
+
"add-eslint-inputs": {
|
93
|
+
"cli": "nx",
|
94
|
+
"version": "15.0.0-beta.0",
|
95
|
+
"description": "Stop hashing eslint config files for build targets and dependent tasks",
|
96
|
+
"factory": "./src/migrations/update-15-0-0/add-eslint-inputs"
|
91
97
|
}
|
92
98
|
},
|
93
99
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nrwl/linter",
|
3
|
-
"version": "15.0.0-beta.
|
3
|
+
"version": "15.0.0-beta.1",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Linter plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
|
6
6
|
"repository": {
|
@@ -33,10 +33,10 @@
|
|
33
33
|
"eslint": "^8.0.0"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
-
"@nrwl/devkit": "15.0.0-beta.
|
37
|
-
"@nrwl/jest": "15.0.0-beta.
|
36
|
+
"@nrwl/devkit": "15.0.0-beta.1",
|
37
|
+
"@nrwl/jest": "15.0.0-beta.1",
|
38
38
|
"@phenomnomnominal/tsquery": "4.1.1",
|
39
|
-
"nx": "15.0.0-beta.
|
39
|
+
"nx": "15.0.0-beta.1",
|
40
40
|
"tmp": "~0.2.1",
|
41
41
|
"tslib": "^2.3.0"
|
42
42
|
},
|
@@ -49,5 +49,5 @@
|
|
49
49
|
"access": "public"
|
50
50
|
},
|
51
51
|
"types": "./index.d.ts",
|
52
|
-
"gitHead": "
|
52
|
+
"gitHead": "49c5e5069b80605943ef3bbe965e291d79354cd5"
|
53
53
|
}
|
@@ -8,14 +8,14 @@
|
|
8
8
|
"linter": {
|
9
9
|
"description": "The tool to use for running lint checks.",
|
10
10
|
"type": "string",
|
11
|
-
"enum": ["eslint"
|
11
|
+
"enum": ["eslint"],
|
12
12
|
"default": "eslint"
|
13
13
|
},
|
14
14
|
"config": {
|
15
15
|
"type": "string",
|
16
16
|
"description": "The name of the configuration file.",
|
17
17
|
"x-completion-type": "file",
|
18
|
-
"x-completion-glob": "
|
18
|
+
"x-completion-glob": ".eslintrc.json)"
|
19
19
|
},
|
20
20
|
"tsConfig": {
|
21
21
|
"description": "The name of the TypeScript configuration file.",
|
@@ -57,7 +57,9 @@
|
|
57
57
|
"tap"
|
58
58
|
]
|
59
59
|
},
|
60
|
-
{
|
60
|
+
{
|
61
|
+
"minLength": 1
|
62
|
+
}
|
61
63
|
]
|
62
64
|
},
|
63
65
|
"exclude": {
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const devkit_1 = require("@nrwl/devkit");
|
5
|
+
const executor_options_utils_1 = require("@nrwl/workspace/src/utilities/executor-options-utils");
|
6
|
+
const path_1 = require("path");
|
7
|
+
function default_1(tree) {
|
8
|
+
var _a, _b, _c, _d;
|
9
|
+
var _e;
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
11
|
+
const workspaceConfiguration = (0, devkit_1.readWorkspaceConfiguration)(tree);
|
12
|
+
const globalEslintFile = ['.eslintrc.js', '.eslintrc.json'].find((file) => tree.exists(file));
|
13
|
+
if (globalEslintFile && ((_a = workspaceConfiguration.namedInputs) === null || _a === void 0 ? void 0 : _a.production)) {
|
14
|
+
const productionFileset = new Set(workspaceConfiguration.namedInputs.production);
|
15
|
+
productionFileset.add('!{projectRoot}/.eslintrc.json');
|
16
|
+
workspaceConfiguration.namedInputs.production =
|
17
|
+
Array.from(productionFileset);
|
18
|
+
}
|
19
|
+
for (const targetName of getEslintTargets(tree)) {
|
20
|
+
(_b = workspaceConfiguration.targetDefaults) !== null && _b !== void 0 ? _b : (workspaceConfiguration.targetDefaults = {});
|
21
|
+
const lintTargetDefaults = ((_c = (_e = workspaceConfiguration.targetDefaults)[targetName]) !== null && _c !== void 0 ? _c : (_e[targetName] = {}));
|
22
|
+
(_d = lintTargetDefaults.inputs) !== null && _d !== void 0 ? _d : (lintTargetDefaults.inputs = [
|
23
|
+
'default',
|
24
|
+
...(globalEslintFile ? [(0, path_1.join)('{workspaceRoot}', globalEslintFile)] : []),
|
25
|
+
]);
|
26
|
+
}
|
27
|
+
(0, devkit_1.updateWorkspaceConfiguration)(tree, workspaceConfiguration);
|
28
|
+
yield (0, devkit_1.formatFiles)(tree);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
exports.default = default_1;
|
32
|
+
function getEslintTargets(tree) {
|
33
|
+
const eslintTargetNames = new Set();
|
34
|
+
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/linter:eslint', (_, __, target) => {
|
35
|
+
eslintTargetNames.add(target);
|
36
|
+
});
|
37
|
+
return eslintTargetNames;
|
38
|
+
}
|
39
|
+
//# sourceMappingURL=add-eslint-inputs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"add-eslint-inputs.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-15-0-0/add-eslint-inputs.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AACtB,iGAA8F;AAC9F,+BAA4B;AAE5B,mBAA+B,IAAU;;;;QACvC,MAAM,sBAAsB,GAAG,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC;QAEhE,MAAM,gBAAgB,GAAG,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACxE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,CAAC;QAEF,IAAI,gBAAgB,KAAI,MAAA,sBAAsB,CAAC,WAAW,0CAAE,UAAU,CAAA,EAAE;YACtE,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,sBAAsB,CAAC,WAAW,CAAC,UAAU,CAC9C,CAAC;YACF,iBAAiB,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YACvD,sBAAsB,CAAC,WAAW,CAAC,UAAU;gBAC3C,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;SACjC;QAED,KAAK,MAAM,UAAU,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC/C,MAAA,sBAAsB,CAAC,cAAc,oCAArC,sBAAsB,CAAC,cAAc,GAAK,EAAE,EAAC;YAC7C,MAAM,kBAAkB,GAAG,aAAC,sBAAsB,CAAC,cAAc,EAC/D,UAAU,wCAAV,UAAU,IACN,EAAE,EAAC,CAAC;YAEV,MAAA,kBAAkB,CAAC,MAAM,oCAAzB,kBAAkB,CAAC,MAAM,GAAK;gBAC5B,SAAS;gBACT,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;aACzE,EAAC;SACH;QAED,IAAA,qCAA4B,EAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;QAE3D,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AA/BD,4BA+BC;AAED,SAAS,gBAAgB,CAAC,IAAU;IAClC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;IAC5C,IAAA,+CAAsB,EAAC,IAAI,EAAE,qBAAqB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;QACpE,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IACH,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
|