@angular-eslint/schematics 18.1.1-alpha.1 → 18.1.1-alpha.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/dist/convert-tslint-to-eslint/index.js +1 -1
- package/dist/migrations/update-12-0-0/update-12-0-0.js +1 -1
- package/dist/migrations/update-13-0-0/update-13-0-0.js +1 -1
- package/dist/migrations/update-14-0-0/update-14-0-0.js +1 -1
- package/dist/migrations/update-15-0-0/update-15-0-0.js +1 -1
- package/dist/migrations/update-16-0-0/update-16-0-0.js +1 -1
- package/dist/migrations/update-17-0-0/update-17-0-0.js +1 -1
- package/dist/migrations/update-17-3-0/update-17-3-0.js +1 -1
- package/dist/migrations/update-2-0-0/update-2-0-0.js +1 -1
- package/dist/migrations/update-3-0-0/update-3-0-0.js +1 -1
- package/dist/migrations/update-4-0-0/update-4-0-0.js +1 -1
- package/dist/migrations/utils/dependencies.js +1 -2
- package/dist/ng-add/index.js +1 -1
- package/dist/utils.js +13 -14
- package/dist/workspace/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
function default_1() {
|
|
4
5
|
return () => {
|
|
5
6
|
throw new Error('\n' +
|
|
@@ -10,4 +11,3 @@ Please see https://github.com/angular-eslint/angular-eslint/blob/main/docs/MIGRA
|
|
|
10
11
|
`.trim());
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
|
-
exports.default = default_1;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = migration;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const utils_1 = require("../../utils");
|
|
5
6
|
const dependencies_1 = require("../utils/dependencies");
|
|
@@ -108,4 +109,3 @@ function migration() {
|
|
|
108
109
|
addEqeqeq,
|
|
109
110
|
]);
|
|
110
111
|
}
|
|
111
|
-
exports.default = migration;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = migration;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const dependencies_1 = require("../utils/dependencies");
|
|
5
6
|
const updatedTypeScriptESLintVersion = '5.3.0';
|
|
@@ -31,4 +32,3 @@ function migration() {
|
|
|
31
32
|
]),
|
|
32
33
|
]);
|
|
33
34
|
}
|
|
34
|
-
exports.default = migration;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = migration;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const utils_1 = require("../../utils");
|
|
@@ -48,4 +49,3 @@ function migration() {
|
|
|
48
49
|
}),
|
|
49
50
|
]);
|
|
50
51
|
}
|
|
51
|
-
exports.default = migration;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = migration;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const utils_1 = require("../../utils");
|
|
5
6
|
const dependencies_1 = require("../utils/dependencies");
|
|
@@ -37,4 +38,3 @@ function migration() {
|
|
|
37
38
|
}),
|
|
38
39
|
]);
|
|
39
40
|
}
|
|
40
|
-
exports.default = migration;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = migration;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const utils_1 = require("../../utils");
|
|
5
6
|
const dependencies_1 = require("../utils/dependencies");
|
|
@@ -28,7 +29,6 @@ function migration() {
|
|
|
28
29
|
updateA11yRules,
|
|
29
30
|
]);
|
|
30
31
|
}
|
|
31
|
-
exports.default = migration;
|
|
32
32
|
// Remove the accessibility- prefix from all relevant template rules
|
|
33
33
|
function updateA11yRules() {
|
|
34
34
|
function modifyRules(parent) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = migration;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const dependencies_1 = require("../utils/dependencies");
|
|
5
6
|
const updatedTypeScriptESLintVersion = '6.10.0';
|
|
@@ -26,4 +27,3 @@ function migration() {
|
|
|
26
27
|
]),
|
|
27
28
|
]);
|
|
28
29
|
}
|
|
29
|
-
exports.default = migration;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = migration;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const dependencies_1 = require("../utils/dependencies");
|
|
5
6
|
const updatedTypeScriptESLintVersion = '7.2.0';
|
|
@@ -26,4 +27,3 @@ function migration() {
|
|
|
26
27
|
]),
|
|
27
28
|
]);
|
|
28
29
|
}
|
|
29
|
-
exports.default = migration;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const utils_1 = require("../../utils");
|
|
@@ -57,4 +58,3 @@ function removeUsePipeDecoratorRule() {
|
|
|
57
58
|
function default_1() {
|
|
58
59
|
return (0, schematics_1.chain)([updateRelevantDependencies, removeUsePipeDecoratorRule]);
|
|
59
60
|
}
|
|
60
|
-
exports.default = default_1;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const utils_1 = require("../../utils");
|
|
@@ -92,4 +93,3 @@ function default_1() {
|
|
|
92
93
|
updateComponentMaxInlineDeclarations,
|
|
93
94
|
]);
|
|
94
95
|
}
|
|
95
|
-
exports.default = default_1;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const utils_1 = require("../../utils");
|
|
@@ -25,4 +26,3 @@ function updateRelevantDependencies(host, context) {
|
|
|
25
26
|
function default_1() {
|
|
26
27
|
return (0, schematics_1.chain)([updateRelevantDependencies]);
|
|
27
28
|
}
|
|
28
|
-
exports.default = default_1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateDependencies =
|
|
3
|
+
exports.updateDependencies = updateDependencies;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
@@ -17,7 +17,6 @@ function updateDependencies(depsToUpdate) {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
}
|
|
20
|
-
exports.updateDependencies = updateDependencies;
|
|
21
20
|
function updateIfExists(packageJson, depName, updatedVersion) {
|
|
22
21
|
if (!packageJson) {
|
|
23
22
|
return;
|
package/dist/ng-add/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FIXED_TYPESCRIPT_ESLINT_V7_VERSION = exports.FIXED_ESLINT_V8_VERSION = void 0;
|
|
4
|
+
exports.default = default_1;
|
|
4
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
6
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
@@ -142,4 +143,3 @@ function default_1() {
|
|
|
142
143
|
])(host, context);
|
|
143
144
|
};
|
|
144
145
|
}
|
|
145
|
-
exports.default = default_1;
|
package/dist/utils.js
CHANGED
|
@@ -3,7 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.readJsonInTree = readJsonInTree;
|
|
7
|
+
exports.updateJsonInTree = updateJsonInTree;
|
|
8
|
+
exports.getTargetsConfigFromProject = getTargetsConfigFromProject;
|
|
9
|
+
exports.addESLintTargetToProject = addESLintTargetToProject;
|
|
10
|
+
exports.visitNotIgnoredFiles = visitNotIgnoredFiles;
|
|
11
|
+
exports.createRootESLintConfig = createRootESLintConfig;
|
|
12
|
+
exports.createStringifiedRootESLintConfig = createStringifiedRootESLintConfig;
|
|
13
|
+
exports.createESLintConfigForProject = createESLintConfigForProject;
|
|
14
|
+
exports.sortObjectByKeys = sortObjectByKeys;
|
|
15
|
+
exports.determineTargetProjectName = determineTargetProjectName;
|
|
16
|
+
exports.updateSchematicCollections = updateSchematicCollections;
|
|
17
|
+
exports.updateSchematicDefaults = updateSchematicDefaults;
|
|
18
|
+
exports.shouldUseFlatConfig = shouldUseFlatConfig;
|
|
7
19
|
const core_1 = require("@angular-devkit/core");
|
|
8
20
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
9
21
|
const ignore_1 = __importDefault(require("ignore"));
|
|
@@ -30,7 +42,6 @@ function readJsonInTree(host, path) {
|
|
|
30
42
|
throw new Error(`Cannot parse ${path}: ${e instanceof Error ? e.message : ''}`);
|
|
31
43
|
}
|
|
32
44
|
}
|
|
33
|
-
exports.readJsonInTree = readJsonInTree;
|
|
34
45
|
/**
|
|
35
46
|
* This method is specifically for updating JSON in a Tree
|
|
36
47
|
* @param path Path of JSON file in the Tree
|
|
@@ -48,7 +59,6 @@ function updateJsonInTree(path, callback) {
|
|
|
48
59
|
return host;
|
|
49
60
|
};
|
|
50
61
|
}
|
|
51
|
-
exports.updateJsonInTree = updateJsonInTree;
|
|
52
62
|
function getTargetsConfigFromProject(projectConfig) {
|
|
53
63
|
if (!projectConfig) {
|
|
54
64
|
return null;
|
|
@@ -62,7 +72,6 @@ function getTargetsConfigFromProject(projectConfig) {
|
|
|
62
72
|
}
|
|
63
73
|
return null;
|
|
64
74
|
}
|
|
65
|
-
exports.getTargetsConfigFromProject = getTargetsConfigFromProject;
|
|
66
75
|
function serializeJson(json) {
|
|
67
76
|
return `${JSON.stringify(json, null, 2)}\n`;
|
|
68
77
|
}
|
|
@@ -106,7 +115,6 @@ function addESLintTargetToProject(tree, projectName, targetName) {
|
|
|
106
115
|
existingProjectConfig.architect[targetName] = eslintTargetConfig;
|
|
107
116
|
updateProjectConfiguration(tree, projectName, existingProjectConfig);
|
|
108
117
|
}
|
|
109
|
-
exports.addESLintTargetToProject = addESLintTargetToProject;
|
|
110
118
|
/**
|
|
111
119
|
* Utility to act on all files in a tree that are not ignored by git.
|
|
112
120
|
*/
|
|
@@ -138,7 +146,6 @@ function visitNotIgnoredFiles(visitor, dir = (0, core_1.normalize)('')) {
|
|
|
138
146
|
visit(dir);
|
|
139
147
|
};
|
|
140
148
|
}
|
|
141
|
-
exports.visitNotIgnoredFiles = visitNotIgnoredFiles;
|
|
142
149
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
143
150
|
function setESLintProjectBasedOnProjectType(projectRoot, projectType, hasE2e) {
|
|
144
151
|
let project;
|
|
@@ -197,7 +204,6 @@ function createRootESLintConfig(prefix) {
|
|
|
197
204
|
],
|
|
198
205
|
};
|
|
199
206
|
}
|
|
200
|
-
exports.createRootESLintConfig = createRootESLintConfig;
|
|
201
207
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
202
208
|
function createStringifiedRootESLintConfig(prefix) {
|
|
203
209
|
return `// @ts-check
|
|
@@ -247,7 +253,6 @@ module.exports = tseslint.config(
|
|
|
247
253
|
);
|
|
248
254
|
`;
|
|
249
255
|
}
|
|
250
|
-
exports.createStringifiedRootESLintConfig = createStringifiedRootESLintConfig;
|
|
251
256
|
function createProjectESLintConfig(projectRoot, projectType, prefix, setParserOptionsProject, hasE2e) {
|
|
252
257
|
return {
|
|
253
258
|
extends: `${(0, devkit_imports_1.offsetFromRoot)(projectRoot)}.eslintrc.json`,
|
|
@@ -348,7 +353,6 @@ function createESLintConfigForProject(tree, projectName, setParserOptionsProject
|
|
|
348
353
|
(0, devkit_imports_1.writeJson)(tree, (0, core_1.join)((0, core_1.normalize)(projectRoot), '.eslintrc.json'), createProjectESLintConfig(projectRoot, projectType || 'library', prefix || DEFAULT_PREFIX, setParserOptionsProject, hasE2e));
|
|
349
354
|
}
|
|
350
355
|
}
|
|
351
|
-
exports.createESLintConfigForProject = createESLintConfigForProject;
|
|
352
356
|
function createRootESLintConfigFile(tree, prefix, useFlatConfig) {
|
|
353
357
|
if (useFlatConfig) {
|
|
354
358
|
return tree.write('eslint.config.js', createStringifiedRootESLintConfig(prefix));
|
|
@@ -365,7 +369,6 @@ function sortObjectByKeys(obj) {
|
|
|
365
369
|
};
|
|
366
370
|
}, {});
|
|
367
371
|
}
|
|
368
|
-
exports.sortObjectByKeys = sortObjectByKeys;
|
|
369
372
|
/**
|
|
370
373
|
* To make certain schematic usage conversion more ergonomic, if the user does not specify a project
|
|
371
374
|
* and only has a single project in their angular.json we will just go ahead and use that one.
|
|
@@ -381,7 +384,6 @@ function determineTargetProjectName(tree, maybeProject) {
|
|
|
381
384
|
}
|
|
382
385
|
return null;
|
|
383
386
|
}
|
|
384
|
-
exports.determineTargetProjectName = determineTargetProjectName;
|
|
385
387
|
/**
|
|
386
388
|
* See `schematicCollections` docs here:
|
|
387
389
|
* https://github.com/angular/angular-cli/blob/8431b3f0769b5f95b9e13807a09293d820c4b017/docs/specifications/schematic-collections-config.md
|
|
@@ -396,7 +398,6 @@ function updateSchematicCollections(angularJson) {
|
|
|
396
398
|
delete angularJson.cli.defaultCollection;
|
|
397
399
|
return angularJson;
|
|
398
400
|
}
|
|
399
|
-
exports.updateSchematicCollections = updateSchematicCollections;
|
|
400
401
|
function updateSchematicDefaults(angularJson, schematicFullName, defaultValues) {
|
|
401
402
|
angularJson.schematics = angularJson.schematics || {};
|
|
402
403
|
angularJson.schematics[schematicFullName] =
|
|
@@ -407,7 +408,6 @@ function updateSchematicDefaults(angularJson, schematicFullName, defaultValues)
|
|
|
407
408
|
};
|
|
408
409
|
return angularJson;
|
|
409
410
|
}
|
|
410
|
-
exports.updateSchematicDefaults = updateSchematicDefaults;
|
|
411
411
|
/**
|
|
412
412
|
* In order to support both flat config and eslintrc we need to dynamically figure out
|
|
413
413
|
* what the user should be using based on:
|
|
@@ -443,4 +443,3 @@ function shouldUseFlatConfig(tree, existingJson) {
|
|
|
443
443
|
return useFlatConfig;
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
exports.shouldUseFlatConfig = shouldUseFlatConfig;
|
package/dist/workspace/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
function default_1() {
|
|
4
5
|
return () => {
|
|
5
6
|
throw new Error('\n' +
|
|
@@ -16,4 +17,3 @@ Instead, simply:
|
|
|
16
17
|
`.trim());
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
|
-
exports.default = default_1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/schematics",
|
|
3
|
-
"version": "18.1.1-alpha.
|
|
3
|
+
"version": "18.1.1-alpha.3",
|
|
4
4
|
"description": "Angular Schematics for angular-eslint",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"save": "devDependencies"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@angular-eslint/eslint-plugin": "18.1.1-alpha.
|
|
40
|
-
"@angular-eslint/eslint-plugin-template": "18.1.1-alpha.
|
|
39
|
+
"@angular-eslint/eslint-plugin": "18.1.1-alpha.3",
|
|
40
|
+
"@angular-eslint/eslint-plugin-template": "18.1.1-alpha.3",
|
|
41
41
|
"@nx/devkit": "^19.0.6",
|
|
42
42
|
"ignore": "5.3.1",
|
|
43
43
|
"nx": "^19.0.6",
|
|
44
|
-
"semver": "7.6.
|
|
44
|
+
"semver": "7.6.3",
|
|
45
45
|
"strip-json-comments": "3.1.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|