@nrwl/linter 14.8.8 → 14.9.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/LICENSE +22 -22
- package/README.md +5 -26
- package/executors.json +0 -10
- package/migrations.json +12 -84
- package/package.json +4 -6
- package/src/executors/eslint/hasher.d.ts +1 -1
- package/src/executors/eslint/hasher.js +1 -1
- package/src/executors/eslint/hasher.js.map +1 -1
- package/src/executors/eslint/lint.impl.js +2 -2
- package/src/executors/eslint/lint.impl.js.map +1 -1
- package/src/executors/eslint/schema.json +12 -6
- package/src/generators/init/global-eslint-config.d.ts +36 -0
- package/src/generators/init/global-eslint-config.js +77 -0
- package/src/generators/init/global-eslint-config.js.map +1 -0
- package/src/generators/init/init-migration.d.ts +3 -0
- package/src/generators/init/init-migration.js +68 -0
- package/src/generators/init/init-migration.js.map +1 -0
- package/src/generators/init/init.d.ts +1 -0
- package/src/generators/init/init.js +12 -160
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/lint-project/lint-project.d.ts +2 -0
- package/src/generators/lint-project/lint-project.js +65 -30
- package/src/generators/lint-project/lint-project.js.map +1 -1
- package/src/generators/utils/eslint-file.d.ts +4 -2
- package/src/generators/utils/eslint-file.js +18 -5
- package/src/generators/utils/eslint-file.js.map +1 -1
- package/src/generators/utils/eslint-targets.d.ts +2 -0
- package/src/generators/utils/eslint-targets.js +13 -0
- package/src/generators/utils/eslint-targets.js.map +1 -0
- package/src/generators/utils/linter.d.ts +0 -1
- package/src/generators/utils/linter.js +0 -1
- package/src/generators/utils/linter.js.map +1 -1
- package/src/generators/workspace-rule/files/__name__.ts__tmpl__ +1 -1
- package/src/generators/workspace-rule/schema.json +2 -11
- package/src/generators/workspace-rule/workspace-rule.d.ts +1 -1
- package/src/generators/workspace-rule/workspace-rule.js +2 -2
- package/src/generators/workspace-rule/workspace-rule.js.map +1 -1
- package/src/generators/workspace-rules-project/workspace-rules-project.d.ts +1 -1
- package/src/generators/workspace-rules-project/workspace-rules-project.js +30 -9
- package/src/generators/workspace-rules-project/workspace-rules-project.js.map +1 -1
- package/src/migrations/update-13-3-0/eslint-8-updates.js +3 -2
- package/src/migrations/update-13-3-0/eslint-8-updates.js.map +1 -1
- 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 +33 -0
- package/src/migrations/update-15-0-0/add-eslint-inputs.js.map +1 -0
- package/src/migrations/update-15-7-1/add-eslint-ignore.d.ts +2 -0
- package/src/migrations/update-15-7-1/add-eslint-ignore.js +42 -0
- package/src/migrations/update-15-7-1/add-eslint-ignore.js.map +1 -0
- package/src/utils/convert-tslint-to-eslint/project-converter.d.ts +1 -1
- package/src/utils/convert-tslint-to-eslint/project-converter.js +9 -9
- package/src/utils/convert-tslint-to-eslint/project-converter.js.map +1 -1
- package/src/utils/convert-tslint-to-eslint/utils.d.ts +1 -1
- package/src/utils/testing.d.ts +1 -1
- package/src/utils/versions.d.ts +0 -2
- package/src/utils/versions.js +1 -3
- package/src/utils/versions.js.map +1 -1
- package/src/executors/lint/compat.d.ts +0 -2
- package/src/executors/lint/compat.js +0 -6
- package/src/executors/lint/compat.js.map +0 -1
- package/src/executors/lint/lint.impl.d.ts +0 -2
- package/src/executors/lint/lint.impl.js +0 -10
- package/src/executors/lint/lint.impl.js.map +0 -1
- package/src/executors/lint/schema.json +0 -124
- package/src/migrations/update-10-3-0/add-json-ext-to-eslintrc.d.ts +0 -1
- package/src/migrations/update-10-3-0/add-json-ext-to-eslintrc.js +0 -52
- package/src/migrations/update-10-3-0/add-json-ext-to-eslintrc.js.map +0 -1
- package/src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps.d.ts +0 -1
- package/src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps.js +0 -18
- package/src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps.js.map +0 -1
- package/src/migrations/update-10-3-0/update-10-3-0.d.ts +0 -1
- package/src/migrations/update-10-3-0/update-10-3-0.js +0 -20
- package/src/migrations/update-10-3-0/update-10-3-0.js.map +0 -1
- package/src/migrations/update-10-3-0/update-eslint-builder-and-config.d.ts +0 -1
- package/src/migrations/update-10-3-0/update-eslint-builder-and-config.js +0 -81
- package/src/migrations/update-10-3-0/update-eslint-builder-and-config.js.map +0 -1
- package/src/migrations/update-10-3-1/revert-node-modules-files-in-eslint-builder-options.d.ts +0 -1
- package/src/migrations/update-10-3-1/revert-node-modules-files-in-eslint-builder-options.js +0 -24
- package/src/migrations/update-10-3-1/revert-node-modules-files-in-eslint-builder-options.js.map +0 -1
- package/src/migrations/update-10-4-0/update-eslint-configs-to-use-nx-presets.d.ts +0 -7
- package/src/migrations/update-10-4-0/update-eslint-configs-to-use-nx-presets.js +0 -447
- package/src/migrations/update-10-4-0/update-eslint-configs-to-use-nx-presets.js.map +0 -1
- package/src/migrations/update-10-4-0/update-root-eslint-config-to-use-overrides.d.ts +0 -1
- package/src/migrations/update-10-4-0/update-root-eslint-config-to-use-overrides.js +0 -107
- package/src/migrations/update-10-4-0/update-root-eslint-config-to-use-overrides.js.map +0 -1
- package/src/migrations/update-11-5-0/always-use-project-level-tsconfigs-with-eslint.d.ts +0 -3
- package/src/migrations/update-11-5-0/always-use-project-level-tsconfigs-with-eslint.js +0 -95
- package/src/migrations/update-11-5-0/always-use-project-level-tsconfigs-with-eslint.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"workspace-rules-project.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/workspace-rules-project/workspace-rules-project.ts"],"names":[],"mappings":";;;;AAAA,
|
1
|
+
{"version":3,"file":"workspace-rules-project.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/generators/workspace-rules-project/workspace-rules-project.ts"],"names":[],"mappings":";;;;AAAA,yCAcsB;AACtB,iCAAyD;AACzD,+BAA4B;AAC5B,2EAA0E;AAC1E,oDAAuE;AACvE,mDAAiD;AAEpC,QAAA,4BAA4B,GAAG,cAAc,C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A9FD,gFA8FC;AAEY,QAAA,kCAAkC,GAAG,IAAA,2BAAkB,EAClE,kCAAkC,CACnC,CAAC"}
|
@@ -2,14 +2,15 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
5
|
-
const jest_1 = require("@nrwl/jest");
|
6
5
|
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
6
|
+
const versions_1 = require("../../utils/versions");
|
7
7
|
function eslint8Updates(tree) {
|
8
8
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
9
9
|
try {
|
10
|
+
const { addPropertyToJestConfig } = (0, devkit_1.ensurePackage)('@nrwl/jest', versions_1.nxVersion);
|
10
11
|
const existingJestConfigPath = (0, devkit_1.normalizePath)('tools/eslint-rules/jest.config.js');
|
11
12
|
// Add extra config to the jest.config.js file to allow ESLint 8 exports mapping to work with jest
|
12
|
-
|
13
|
+
addPropertyToJestConfig(tree, existingJestConfigPath, 'moduleNameMapper', {
|
13
14
|
'@eslint/eslintrc': '@eslint/eslintrc/dist/eslintrc-universal.cjs',
|
14
15
|
});
|
15
16
|
(0, devkit_1.visitNotIgnoredFiles)(tree, 'tools/eslint-rules', (path) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"eslint-8-updates.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-13-3-0/eslint-8-updates.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"eslint-8-updates.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-13-3-0/eslint-8-updates.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,uDAAoD;AACpD,mDAAiD;AAEjD,SAA8B,cAAc,CAAC,IAAU;;QACrD,IAAI;YACF,MAAM,EAAE,uBAAuB,EAAE,GAAG,IAAA,sBAAa,EAAC,YAAY,EAAE,oBAAS,CAAC,CAAC;YAC3E,MAAM,sB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BAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAAC,WAAM,GAAE;IACZ,CAAC;CAAA;AA7CD,iCA6CC"}
|
@@ -0,0 +1,33 @@
|
|
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 eslint_file_1 = require("../../generators/utils/eslint-file");
|
6
|
+
const eslint_targets_1 = require("../../generators/utils/eslint-targets");
|
7
|
+
function addEslintInputs(tree) {
|
8
|
+
var _a, _b, _c, _d;
|
9
|
+
var _e;
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
11
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
12
|
+
const globalEslintFile = eslint_file_1.eslintConfigFileWhitelist.find((file) => tree.exists(file));
|
13
|
+
if (globalEslintFile && ((_a = nxJson.namedInputs) === null || _a === void 0 ? void 0 : _a.production)) {
|
14
|
+
const productionFileset = new Set(nxJson.namedInputs.production);
|
15
|
+
productionFileset.add(`!{projectRoot}/${globalEslintFile}`);
|
16
|
+
nxJson.namedInputs.production = Array.from(productionFileset);
|
17
|
+
}
|
18
|
+
for (const targetName of (0, eslint_targets_1.getEslintTargets)(tree)) {
|
19
|
+
(_b = nxJson.targetDefaults) !== null && _b !== void 0 ? _b : (nxJson.targetDefaults = {});
|
20
|
+
const lintTargetDefaults = ((_c = (_e = nxJson.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.updateNxJson)(tree, nxJson);
|
29
|
+
yield (0, devkit_1.formatFiles)(tree);
|
30
|
+
});
|
31
|
+
}
|
32
|
+
exports.default = addEslintInputs;
|
33
|
+
//# 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,oEAA+E;AAC/E,0EAAyE;AAEzE,SAA8B,eAAe,CAAC,IAAU;;;;QACtD,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,IAAI,CAAC,CAAC;QAEhC,MAAM,gBAAgB,GAAG,uCAAyB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC/D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,CAAC;QAEF,IAAI,gBAAgB,KAAI,MAAA,MAAM,CAAC,WAAW,0CAAE,UAAU,CAAA,EAAE;YACtD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAEjE,iBAAiB,CAAC,GAAG,CAAC,kBAAkB,gBAAgB,EAAE,CAAC,CAAC;YAE5D,MAAM,CAAC,WAAW,CAAC,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;SAC/D;QAED,KAAK,MAAM,UAAU,IAAI,IAAA,iCAAgB,EAAC,IAAI,CAAC,EAAE;YAC/C,MAAA,MAAM,CAAC,cAAc,oCAArB,MAAM,CAAC,cAAc,GAAK,EAAE,EAAC;YAE7B,MAAM,kBAAkB,GAAG,aAAC,MAAM,CAAC,cAAc,EAAC,UAAU,wCAAV,UAAU,IAAM,EAAE,EAAC,CAAC;YAEtE,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,qBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAE3B,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AA/BD,kCA+BC"}
|
@@ -0,0 +1,42 @@
|
|
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 eslint_file_1 = require("../../generators/utils/eslint-file");
|
6
|
+
const eslint_targets_1 = require("../../generators/utils/eslint-targets");
|
7
|
+
function addEslintIgnore(tree) {
|
8
|
+
var _a, _b;
|
9
|
+
var _c;
|
10
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
11
|
+
const nxJson = (0, devkit_1.readJson)(tree, 'nx.json');
|
12
|
+
const globalEslintFile = eslint_file_1.eslintConfigFileWhitelist.find((file) => tree.exists(file));
|
13
|
+
if (globalEslintFile) {
|
14
|
+
if (tree.exists('.eslintignore')) {
|
15
|
+
const content = tree.read('.eslintignore', 'utf-8');
|
16
|
+
if (!content.includes('node_modules')) {
|
17
|
+
tree.write('.eslintignore', `node_modules\n${content}`);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
else {
|
21
|
+
tree.write('.eslintignore', 'node_modules\n');
|
22
|
+
}
|
23
|
+
for (const targetName of (0, eslint_targets_1.getEslintTargets)(tree)) {
|
24
|
+
(_a = nxJson.targetDefaults) !== null && _a !== void 0 ? _a : (nxJson.targetDefaults = {});
|
25
|
+
const lintTargetDefaults = ((_b = (_c = nxJson.targetDefaults)[targetName]) !== null && _b !== void 0 ? _b : (_c[targetName] = {}));
|
26
|
+
const lintIgnorePath = (0, devkit_1.joinPathFragments)('{workspaceRoot}', globalEslintFile);
|
27
|
+
if (lintTargetDefaults.inputs) {
|
28
|
+
if (!lintTargetDefaults.inputs.includes(lintIgnorePath)) {
|
29
|
+
lintTargetDefaults.inputs.push(lintIgnorePath);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
lintTargetDefaults.inputs = ['default', lintIgnorePath];
|
34
|
+
}
|
35
|
+
}
|
36
|
+
(0, devkit_1.updateNxJson)(tree, nxJson);
|
37
|
+
yield (0, devkit_1.formatFiles)(tree);
|
38
|
+
}
|
39
|
+
});
|
40
|
+
}
|
41
|
+
exports.default = addEslintIgnore;
|
42
|
+
//# sourceMappingURL=add-eslint-ignore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"add-eslint-ignore.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-15-7-1/add-eslint-ignore.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,oEAA+E;AAC/E,0EAAyE;AAEzE,SAA8B,eAAe,CAAC,IAAU;;;;QACtD,MAAM,MAAM,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAEzC,MAAM,gBAAgB,GAAG,uCAAyB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC/D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAClB,CAAC;QAEF,IAAI,gBAAgB,EAAE;YACpB,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;gBAChC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;gBACpD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;oBACrC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,iBAAiB,OAAO,EAAE,CAAC,CAAC;iBACzD;aACF;iBAAM;gBACL,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;aAC/C;YAED,KAAK,MAAM,UAAU,IAAI,IAAA,iCAAgB,EAAC,IAAI,CAAC,EAAE;gBAC/C,MAAA,MAAM,CAAC,cAAc,oCAArB,MAAM,CAAC,cAAc,GAAK,EAAE,EAAC;gBAC7B,MAAM,kBAAkB,GAAG,aAAC,MAAM,CAAC,cAAc,EAAC,UAAU,wCAAV,UAAU,IAAM,EAAE,EAAC,CAAC;gBAEtE,MAAM,cAAc,GAAG,IAAA,0BAAiB,EACtC,iBAAiB,EACjB,gBAAgB,CACjB,CAAC;gBAEF,IAAI,kBAAkB,CAAC,MAAM,EAAE;oBAC7B,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;wBACvD,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;qBAChD;iBACF;qBAAM;oBACL,kBAAkB,CAAC,MAAM,GAAG,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;iBACzD;aACF;YAED,IAAA,qBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAC3B,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;;CACF;AAtCD,kCAsCC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { GeneratorCallback, ProjectConfiguration, Tree } from '@nrwl/devkit';
|
2
2
|
import type { Linter } from 'eslint';
|
3
3
|
/**
|
4
4
|
* Common schema used by all implementations of convert-tslint-to-eslint generators
|
@@ -291,9 +291,9 @@ class ProjectConverter {
|
|
291
291
|
/**
|
292
292
|
* Update global linter configuration defaults in project configuration
|
293
293
|
*/
|
294
|
-
const
|
295
|
-
this.cleanUpGeneratorsConfig(
|
296
|
-
(0, devkit_1.
|
294
|
+
const nxJson = (0, devkit_1.readNxJson)(this.host);
|
295
|
+
this.cleanUpGeneratorsConfig(nxJson);
|
296
|
+
(0, devkit_1.updateNxJson)(this.host, nxJson);
|
297
297
|
/**
|
298
298
|
* Update project-level linter configuration defaults in project configuration
|
299
299
|
*/
|
@@ -384,12 +384,12 @@ class ProjectConverter {
|
|
384
384
|
}
|
385
385
|
setDefaults(collectionName, defaults) {
|
386
386
|
var _a;
|
387
|
-
const
|
388
|
-
|
389
|
-
(_a =
|
390
|
-
const prev =
|
391
|
-
|
392
|
-
(0, devkit_1.
|
387
|
+
const nxJson = (0, devkit_1.readNxJson)(this.host);
|
388
|
+
nxJson.generators || (nxJson.generators = {});
|
389
|
+
(_a = nxJson.generators)[collectionName] || (_a[collectionName] = {});
|
390
|
+
const prev = nxJson.generators[collectionName];
|
391
|
+
nxJson.generators = Object.assign(Object.assign({}, nxJson.generators), { [collectionName]: Object.assign(Object.assign({}, prev), { 'convert-tslint-to-eslint': Object.assign(Object.assign({}, prev['convert-tslint-to-eslint']), defaults) }) });
|
392
|
+
(0, devkit_1.updateNxJson)(this.host, nxJson);
|
393
393
|
}
|
394
394
|
}
|
395
395
|
exports.ProjectConverter = ProjectConverter;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"project-converter.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/utils/convert-tslint-to-eslint/project-converter.ts"],"names":[],"mappings":";;;;
|
1
|
+
{"version":3,"file":"project-converter.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/utils/convert-tslint-to-eslint/project-converter.ts"],"names":[],"mappings":";;;;AAKA,yCAasB;AAEtB,oFAA2F;AAC3F,yEAAoF;AACpF,mCAIiB;AAajB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,gBAAgB;IAc3B;;;;OAIG;IACH,YAAY,EACV,IAAI,EACJ,WAAW,EACX,0BAA0B,EAC1B,iBAAiB,GASlB;QA9BgB,uBAAkB,GAAG,aAAa,CAAC;QA+BlD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;QAC7D,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAA,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AAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,KAAK,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC7D,KAAK,MAAM,CAAC,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;gBACpE,IAAI,YAAY,CAAC,QAAQ,KAAK,uBAAuB,EAAE;oBACrD,IACE,YAAY,CAAC,OAAO,CAAC,eAAe,KAAK,GAAG,IAAI,CAAC,WAAW,QAAQ,EACpE;wBACA,cAAc,GAAG,WAAW,CAAC;wBAC7B,eAAM,CAAC,IAAI,CACT,0BAA0B,IAAI,CAAC,WAAW,aAAa,cAAc,uCAAuC,CAC7G,CAAC;qBACH;iBACF;aACF;SACF;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,WAAW,CACT,cAAsB,EACtB,QAA8C;;QAE9C,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAErC,MAAM,CAAC,UAAU,KAAjB,MAAM,CAAC,UAAU,GAAK,EAAE,EAAC;QACzB,MAAA,MAAM,CAAC,UAAU,EAAC,cAAc,SAAd,cAAc,IAAM,EAAE,EAAC;QACzC,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QAE/C,MAAM,CAAC,UAAU,mCACZ,MAAM,CAAC,UAAU,KACpB,CAAC,cAAc,CAAC,kCACX,IAAI,KACP,0BAA0B,kCACrB,IAAI,CAAC,0BAA0B,CAAC,GAChC,QAAQ,OAGhB,CAAC;QAEF,IAAA,qBAAY,EAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;CACF;AAxfD,4CAwfC"}
|
@@ -3,7 +3,7 @@ import type { Linter } from 'eslint';
|
|
3
3
|
import type { TSLintRuleOptions } from 'tslint-to-eslint-config';
|
4
4
|
export declare function ensureESLintPluginsAreInstalled(host: Tree, eslintPluginsToBeInstalled: string[]): GeneratorCallback;
|
5
5
|
export declare function convertTSLintConfig(rawTSLintJson: any, tslintJsonPath: string, ignoreExtendsVals: string[]): Promise<{
|
6
|
-
convertedESLintConfig: Linter.Config<Linter.RulesRecord>;
|
6
|
+
convertedESLintConfig: Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;
|
7
7
|
unconvertedTSLintRules: TSLintRuleOptions[];
|
8
8
|
ensureESLintPlugins: string[];
|
9
9
|
}>;
|
package/src/utils/testing.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
1
|
+
import type { Tree } from '@angular-devkit/schematics';
|
2
2
|
export declare function runMigration<T extends object = any>(migrationName: string, options: T, tree: Tree): Promise<import("@angular-devkit/schematics/testing").UnitTestTree>;
|
package/src/utils/versions.d.ts
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
export declare const nxVersion: any;
|
2
|
-
export declare const tslintVersion = "~6.1.0";
|
3
2
|
export declare const tslintToEslintConfigVersion = "^2.13.0";
|
4
|
-
export declare const buildAngularVersion = "~14.2.0";
|
5
3
|
export declare const typescriptESLintVersion = "^5.36.1";
|
6
4
|
export declare const eslintVersion = "~8.15.0";
|
7
5
|
export declare const eslintConfigPrettierVersion = "8.1.0";
|
package/src/utils/versions.js
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.eslintConfigPrettierVersion = exports.eslintVersion = exports.typescriptESLintVersion = exports.
|
3
|
+
exports.eslintConfigPrettierVersion = exports.eslintVersion = exports.typescriptESLintVersion = exports.tslintToEslintConfigVersion = exports.nxVersion = void 0;
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
5
|
-
exports.tslintVersion = '~6.1.0';
|
6
5
|
exports.tslintToEslintConfigVersion = '^2.13.0';
|
7
|
-
exports.buildAngularVersion = '~14.2.0';
|
8
6
|
exports.typescriptESLintVersion = '^5.36.1';
|
9
7
|
exports.eslintVersion = '~8.15.0';
|
10
8
|
exports.eslintConfigPrettierVersion = '8.1.0';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/linter/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAElD,QAAA,
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/linter/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAElD,QAAA,2BAA2B,GAAG,SAAS,CAAC;AAExC,QAAA,uBAAuB,GAAG,SAAS,CAAC;AACpC,QAAA,aAAa,GAAG,SAAS,CAAC;AAC1B,QAAA,2BAA2B,GAAG,OAAO,CAAC"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const devkit_1 = require("@nrwl/devkit");
|
4
|
-
const lint_impl_1 = require("./lint.impl");
|
5
|
-
exports.default = (0, devkit_1.convertNxExecutor)(lint_impl_1.default);
|
6
|
-
//# sourceMappingURL=compat.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/executors/lint/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AACjD,2CAAmC;AAEnC,kBAAe,IAAA,0BAAiB,EAAC,mBAAQ,CAAC,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const tslib_1 = require("tslib");
|
4
|
-
function run(_options, _context) {
|
5
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
6
|
-
throw new Error(`"@nrwl/linter:lint" was deprecated in v10 and is no longer supported. Update your project configuration to use "@nrwl/linter:eslint" builder instead.`);
|
7
|
-
});
|
8
|
-
}
|
9
|
-
exports.default = run;
|
10
|
-
//# sourceMappingURL=lint.impl.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"lint.impl.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/executors/lint/lint.impl.ts"],"names":[],"mappings":";;;AAEA,SAA8B,GAAG,CAC/B,QAAa,EACb,QAAyB;;QAEzB,MAAM,IAAI,KAAK,CACb,uJAAuJ,CACxJ,CAAC;IACJ,CAAC;CAAA;AAPD,sBAOC"}
|
@@ -1,124 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
3
|
-
"title": "Lint Target",
|
4
|
-
"description": "Linter.",
|
5
|
-
"cli": "nx",
|
6
|
-
"type": "object",
|
7
|
-
"properties": {
|
8
|
-
"linter": {
|
9
|
-
"description": "The tool to use for running lint checks.",
|
10
|
-
"type": "string",
|
11
|
-
"enum": ["eslint", "tslint"],
|
12
|
-
"default": "eslint"
|
13
|
-
},
|
14
|
-
"config": {
|
15
|
-
"type": "string",
|
16
|
-
"description": "The name of the configuration file.",
|
17
|
-
"x-completion-type": "file",
|
18
|
-
"x-completion-glob": "(tslint.json|.eslintrc.json)"
|
19
|
-
},
|
20
|
-
"tsConfig": {
|
21
|
-
"description": "The name of the TypeScript configuration file.",
|
22
|
-
"oneOf": [
|
23
|
-
{
|
24
|
-
"type": "string",
|
25
|
-
"x-completion-type": "file",
|
26
|
-
"x-completion-glob": "tsconfig.*.json"
|
27
|
-
},
|
28
|
-
{
|
29
|
-
"type": "array",
|
30
|
-
"items": {
|
31
|
-
"type": "string",
|
32
|
-
"x-completion-type": "file",
|
33
|
-
"x-completion-glob": "tsconfig.*.json"
|
34
|
-
}
|
35
|
-
}
|
36
|
-
]
|
37
|
-
},
|
38
|
-
"format": {
|
39
|
-
"type": "string",
|
40
|
-
"description": "ESLint Output formatter (https://eslint.org/docs/user-guide/formatters).",
|
41
|
-
"default": "stylish",
|
42
|
-
"anyOf": [
|
43
|
-
{
|
44
|
-
"enum": [
|
45
|
-
"stylish",
|
46
|
-
"compact",
|
47
|
-
"codeframe",
|
48
|
-
"unix",
|
49
|
-
"visualstudio",
|
50
|
-
"table",
|
51
|
-
"checkstyle",
|
52
|
-
"html",
|
53
|
-
"jslint-xml",
|
54
|
-
"json",
|
55
|
-
"json-with-metadata",
|
56
|
-
"junit",
|
57
|
-
"tap"
|
58
|
-
]
|
59
|
-
},
|
60
|
-
{ "minLength": 1 }
|
61
|
-
]
|
62
|
-
},
|
63
|
-
"exclude": {
|
64
|
-
"type": "array",
|
65
|
-
"description": "Files to exclude from linting.",
|
66
|
-
"default": [],
|
67
|
-
"items": {
|
68
|
-
"type": "string",
|
69
|
-
"x-completion-type": "file"
|
70
|
-
}
|
71
|
-
},
|
72
|
-
"files": {
|
73
|
-
"type": "array",
|
74
|
-
"description": "Files to include in linting.",
|
75
|
-
"default": [],
|
76
|
-
"items": {
|
77
|
-
"type": "string",
|
78
|
-
"x-completion-type": "file"
|
79
|
-
}
|
80
|
-
},
|
81
|
-
"force": {
|
82
|
-
"type": "boolean",
|
83
|
-
"description": "Succeeds even if there was linting errors.",
|
84
|
-
"default": false
|
85
|
-
},
|
86
|
-
"silent": {
|
87
|
-
"type": "boolean",
|
88
|
-
"description": "Hide output text.",
|
89
|
-
"default": false
|
90
|
-
},
|
91
|
-
"fix": {
|
92
|
-
"type": "boolean",
|
93
|
-
"description": "Fixes linting errors (may overwrite linted files).",
|
94
|
-
"default": false
|
95
|
-
},
|
96
|
-
"cache": {
|
97
|
-
"type": "boolean",
|
98
|
-
"description": "Only check changed files.",
|
99
|
-
"default": false
|
100
|
-
},
|
101
|
-
"cacheLocation": {
|
102
|
-
"type": "string",
|
103
|
-
"description": "Path to the cache file or directory.",
|
104
|
-
"x-completion-type": "directory"
|
105
|
-
},
|
106
|
-
"outputFile": {
|
107
|
-
"type": "string",
|
108
|
-
"description": "File to write report to.",
|
109
|
-
"x-completion-type": "file"
|
110
|
-
},
|
111
|
-
"maxWarnings": {
|
112
|
-
"type": "number",
|
113
|
-
"description": "Number of warnings to trigger nonzero exit code - default: `-1`.",
|
114
|
-
"default": -1
|
115
|
-
},
|
116
|
-
"quiet": {
|
117
|
-
"type": "boolean",
|
118
|
-
"description": "Report errors only - default: `false`.",
|
119
|
-
"default": false
|
120
|
-
}
|
121
|
-
},
|
122
|
-
"additionalProperties": false,
|
123
|
-
"required": ["linter"]
|
124
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function (): import("@angular-devkit/schematics").Rule;
|
@@ -1,52 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const core_1 = require("@angular-devkit/core");
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
5
|
-
const workspace_1 = require("@nrwl/workspace");
|
6
|
-
function updateESLintConfigReferencesInWorkspace() {
|
7
|
-
return (0, workspace_1.updateBuilderConfig)((options, target, project) => {
|
8
|
-
if (target.builder === '@nrwl/linter:lint' &&
|
9
|
-
(options === null || options === void 0 ? void 0 : options.linter) === 'tslint') {
|
10
|
-
return options;
|
11
|
-
}
|
12
|
-
if (target.builder === '@nrwl/linter:eslint') {
|
13
|
-
if (!options.eslintConfig) {
|
14
|
-
return options;
|
15
|
-
}
|
16
|
-
options.eslintConfig = `${options.eslintConfig}.json`;
|
17
|
-
return options;
|
18
|
-
}
|
19
|
-
if (target.builder === '@nrwl/linter:lint') {
|
20
|
-
if (!options.config) {
|
21
|
-
return options;
|
22
|
-
}
|
23
|
-
options.config = `${options.config}.json`;
|
24
|
-
return options;
|
25
|
-
}
|
26
|
-
}, '@nrwl/linter:eslint', '@nrwl/linter:lint');
|
27
|
-
}
|
28
|
-
function renameESLintConfigFiles() {
|
29
|
-
return (0, workspace_1.visitNotIgnoredFiles)((file, host, context) => {
|
30
|
-
if ((0, core_1.basename)(file) !== '.eslintrc') {
|
31
|
-
return;
|
32
|
-
}
|
33
|
-
// Using .eslintrc without an explicit file extension is deprecated
|
34
|
-
const newFilePath = `${file}.json`;
|
35
|
-
context.logger.info(`Renaming ${file} to ${newFilePath}`);
|
36
|
-
try {
|
37
|
-
return host.rename(file, newFilePath);
|
38
|
-
}
|
39
|
-
catch (e) {
|
40
|
-
context.logger.error(e);
|
41
|
-
}
|
42
|
-
});
|
43
|
-
}
|
44
|
-
function default_1() {
|
45
|
-
return (0, schematics_1.chain)([
|
46
|
-
renameESLintConfigFiles,
|
47
|
-
updateESLintConfigReferencesInWorkspace,
|
48
|
-
(0, workspace_1.formatFiles)(),
|
49
|
-
]);
|
50
|
-
}
|
51
|
-
exports.default = default_1;
|
52
|
-
//# sourceMappingURL=add-json-ext-to-eslintrc.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"add-json-ext-to-eslintrc.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-10-3-0/add-json-ext-to-eslintrc.ts"],"names":[],"mappings":";;AAAA,+CAAgD;AAChD,2DAAmD;AACnD,+CAIyB;AAEzB,SAAS,uCAAuC;IAC9C,OAAO,IAAA,+BAAmB,EACxB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QAC3B,IACE,MAAM,CAAC,OAAO,KAAK,mBAAmB;YACtC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,MAAK,QAAQ,EAC5B;YACA,OAAO,OAAO,CAAC;SAChB;QAED,IAAI,MAAM,CAAC,OAAO,KAAK,qBAAqB,EAAE;YAC5C,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBACzB,OAAO,OAAO,CAAC;aAChB;YACD,OAAO,CAAC,YAAY,GAAG,GAAG,OAAO,CAAC,YAAY,OAAO,CAAC;YACtD,OAAO,OAAO,CAAC;SAChB;QAED,IAAI,MAAM,CAAC,OAAO,KAAK,mBAAmB,EAAE;YAC1C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;gBACnB,OAAO,OAAO,CAAC;aAChB;YACD,OAAO,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC;YAC1C,OAAO,OAAO,CAAC;SAChB;IACH,CAAC,EACD,qBAAqB,EACrB,mBAAmB,CACpB,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB;IAC9B,OAAO,IAAA,gCAAoB,EAAC,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAClD,IAAI,IAAA,eAAQ,EAAC,IAAI,CAAC,KAAK,WAAW,EAAE;YAClC,OAAO;SACR;QACD,mEAAmE;QACnE,MAAM,WAAW,GAAG,GAAG,IAAI,OAAO,CAAC;QACnC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,IAAI,OAAO,WAAW,EAAE,CAAC,CAAC;QAC1D,IAAI;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;SACvC;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACzB;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED;IACE,OAAO,IAAA,kBAAK,EAAC;QACX,uBAAuB;QACvB,uCAAuC;QACvC,IAAA,uBAAW,GAAE;KACd,CAAC,CAAC;AACL,CAAC;AAND,4BAMC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function (): import("@angular-devkit/schematics").Rule;
|
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
4
|
-
const workspace_1 = require("@nrwl/workspace");
|
5
|
-
function addRootESLintrcToImplicitDependencies(host) {
|
6
|
-
return host.exists('nx.json')
|
7
|
-
? (0, workspace_1.updateJsonInTree)('nx.json', (json) => {
|
8
|
-
json.implicitDependencies || (json.implicitDependencies = {});
|
9
|
-
json.implicitDependencies['.eslintrc.json'] = '*';
|
10
|
-
return json;
|
11
|
-
})
|
12
|
-
: (0, schematics_1.noop)();
|
13
|
-
}
|
14
|
-
function default_1() {
|
15
|
-
return (0, schematics_1.chain)([addRootESLintrcToImplicitDependencies, (0, workspace_1.formatFiles)()]);
|
16
|
-
}
|
17
|
-
exports.default = default_1;
|
18
|
-
//# sourceMappingURL=add-root-eslintrc-json-to-workspace-implicit-deps.js.map
|
package/src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"add-root-eslintrc-json-to-workspace-implicit-deps.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps.ts"],"names":[],"mappings":";;AAAA,2DAA+D;AAC/D,+CAAgE;AAEhE,SAAS,qCAAqC,CAAC,IAAU;IACvD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAC3B,CAAC,CAAC,IAAA,4BAAgB,EAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;YACnC,IAAI,CAAC,oBAAoB,KAAzB,IAAI,CAAC,oBAAoB,GAAK,EAAE,EAAC;YACjC,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAC;YAClD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QACJ,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC;AACb,CAAC;AAED;IACE,OAAO,IAAA,kBAAK,EAAC,CAAC,qCAAqC,EAAE,IAAA,uBAAW,GAAE,CAAC,CAAC,CAAC;AACvE,CAAC;AAFD,4BAEC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function (): import("@angular-devkit/schematics").Rule;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
4
|
-
const workspace_1 = require("@nrwl/workspace");
|
5
|
-
const path_1 = require("path");
|
6
|
-
const updatePackages = (0, workspace_1.updatePackagesInPackageJson)((0, path_1.join)(__dirname, '../../..', 'migrations.json'), '10.3.0');
|
7
|
-
const addLintRule = (host) => {
|
8
|
-
return host.exists('.eslintrc')
|
9
|
-
? (0, workspace_1.updateJsonInTree)('.eslintrc', (json) => {
|
10
|
-
json.rules || (json.rules = {});
|
11
|
-
json.rules['@typescript-eslint/explicit-module-boundary-types'] = 'off';
|
12
|
-
return json;
|
13
|
-
})
|
14
|
-
: (0, schematics_1.noop)();
|
15
|
-
};
|
16
|
-
function default_1() {
|
17
|
-
return (0, schematics_1.chain)([updatePackages, addLintRule, (0, workspace_1.formatFiles)()]);
|
18
|
-
}
|
19
|
-
exports.default = default_1;
|
20
|
-
//# sourceMappingURL=update-10-3-0.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update-10-3-0.js","sourceRoot":"","sources":["../../../../../../packages/linter/src/migrations/update-10-3-0/update-10-3-0.ts"],"names":[],"mappings":";;AAAA,2DAA+D;AAC/D,+CAIyB;AACzB,+BAA4B;AAE5B,MAAM,cAAc,GAAG,IAAA,uCAA2B,EAChD,IAAA,WAAI,EAAC,SAAS,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAC9C,QAAQ,CACT,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,IAAU,EAAE,EAAE;IACjC,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QAC7B,CAAC,CAAC,IAAA,4BAAgB,EAAC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;YACrC,IAAI,CAAC,KAAK,KAAV,IAAI,CAAC,KAAK,GAAK,EAAE,EAAC;YAClB,IAAI,CAAC,KAAK,CAAC,mDAAmD,CAAC,GAAG,KAAK,CAAC;YACxE,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QACJ,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC;AACb,CAAC,CAAC;AAEF;IACE,OAAO,IAAA,kBAAK,EAAC,CAAC,cAAc,EAAE,WAAW,EAAE,IAAA,uBAAW,GAAE,CAAC,CAAC,CAAC;AAC7D,CAAC;AAFD,4BAEC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function (): import("@angular-devkit/schematics").Rule;
|