@nrwl/linter 15.0.0-beta.0 → 15.0.0-beta.2
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/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 +40 -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.2](https://github.com/nrwl/nx/compare/14.8.0...15.0.0-beta.2) (2022-10-11)
|
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.2",
|
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.2",
|
37
|
+
"@nrwl/jest": "15.0.0-beta.2",
|
38
38
|
"@phenomnomnominal/tsquery": "4.1.1",
|
39
|
-
"nx": "15.0.0-beta.
|
39
|
+
"nx": "15.0.0-beta.2",
|
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": "66a086413b95691f5c3859dac6879ccba0404531"
|
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,40 @@
|
|
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
|
+
function default_1(tree) {
|
7
|
+
var _a, _b, _c, _d;
|
8
|
+
var _e;
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
10
|
+
const workspaceConfiguration = (0, devkit_1.readWorkspaceConfiguration)(tree);
|
11
|
+
const globalEslintFile = ['.eslintrc.js', '.eslintrc.json'].find((file) => tree.exists(file));
|
12
|
+
if (globalEslintFile && ((_a = workspaceConfiguration.namedInputs) === null || _a === void 0 ? void 0 : _a.production)) {
|
13
|
+
const productionFileset = new Set(workspaceConfiguration.namedInputs.production);
|
14
|
+
productionFileset.add('!{projectRoot}/.eslintrc.json');
|
15
|
+
workspaceConfiguration.namedInputs.production =
|
16
|
+
Array.from(productionFileset);
|
17
|
+
}
|
18
|
+
for (const targetName of getEslintTargets(tree)) {
|
19
|
+
(_b = workspaceConfiguration.targetDefaults) !== null && _b !== void 0 ? _b : (workspaceConfiguration.targetDefaults = {});
|
20
|
+
const lintTargetDefaults = ((_c = (_e = workspaceConfiguration.targetDefaults)[targetName]) !== null && _c !== void 0 ? _c : (_e[targetName] = {}));
|
21
|
+
(_d = lintTargetDefaults.inputs) !== null && _d !== void 0 ? _d : (lintTargetDefaults.inputs = [
|
22
|
+
'default',
|
23
|
+
...(globalEslintFile
|
24
|
+
? [(0, devkit_1.joinPathFragments)('{workspaceRoot}', globalEslintFile)]
|
25
|
+
: []),
|
26
|
+
]);
|
27
|
+
}
|
28
|
+
(0, devkit_1.updateWorkspaceConfiguration)(tree, workspaceConfiguration);
|
29
|
+
yield (0, devkit_1.formatFiles)(tree);
|
30
|
+
});
|
31
|
+
}
|
32
|
+
exports.default = default_1;
|
33
|
+
function getEslintTargets(tree) {
|
34
|
+
const eslintTargetNames = new Set();
|
35
|
+
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/linter:eslint', (_, __, target) => {
|
36
|
+
eslintTargetNames.add(target);
|
37
|
+
});
|
38
|
+
return eslintTargetNames;
|
39
|
+
}
|
40
|
+
//# 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,yCAMsB;AACtB,iGAA8F;AAE9F,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;oBAClB,CAAC,CAAC,CAAC,IAAA,0BAAiB,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;oBAC1D,CAAC,CAAC,EAAE,CAAC;aACR,EAAC;SACH;QAED,IAAA,qCAA4B,EAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;QAE3D,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAjCD,4BAiCC;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"}
|