@angular-eslint/schematics 14.0.0-alpha.0 → 14.0.0-alpha.4
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
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [13.5.0](https://github.com/angular-eslint/angular-eslint/compare/v13.4.0...v13.5.0) (2022-06-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
9
|
+
|
|
10
|
+
# [13.4.0](https://github.com/angular-eslint/angular-eslint/compare/v13.3.0...v13.4.0) (2022-06-11)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- update typescript-eslint packages to v5.27.1 ([#1022](https://github.com/angular-eslint/angular-eslint/issues/1022)) ([99e8d4a](https://github.com/angular-eslint/angular-eslint/commit/99e8d4a256b8d2d71ee9b809649cb0846fdadeb9))
|
|
15
|
+
|
|
16
|
+
# [13.3.0](https://github.com/angular-eslint/angular-eslint/compare/v13.2.1...v13.3.0) (2022-06-10)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- update dependency eslint to v8.17.0 ([#979](https://github.com/angular-eslint/angular-eslint/issues/979)) ([7cabac0](https://github.com/angular-eslint/angular-eslint/commit/7cabac039b895316d6a363cd23765cf7311adf2c))
|
|
21
|
+
|
|
22
|
+
## [13.2.1](https://github.com/angular-eslint/angular-eslint/compare/v13.2.0...v13.2.1) (2022-04-14)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
25
|
+
|
|
26
|
+
# [13.2.0](https://github.com/angular-eslint/angular-eslint/compare/v13.1.0...v13.2.0) (2022-04-03)
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
- **schematics:** support more permutations of ng-add ([#970](https://github.com/angular-eslint/angular-eslint/issues/970)) ([0bf549b](https://github.com/angular-eslint/angular-eslint/commit/0bf549b758a6921ff602136d9872e10bb924baf3))
|
|
31
|
+
|
|
32
|
+
# [13.1.0](https://github.com/angular-eslint/angular-eslint/compare/v13.0.1...v13.1.0) (2022-02-13)
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
- update dependency ignore to v5.2.0 ([#913](https://github.com/angular-eslint/angular-eslint/issues/913)) ([5480102](https://github.com/angular-eslint/angular-eslint/commit/54801025adcd31b721d293e58884b646de41e2b4))
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
- update angular/compiler to v13.2.2 ([#834](https://github.com/angular-eslint/angular-eslint/issues/834)) ([9847978](https://github.com/angular-eslint/angular-eslint/commit/9847978778c3772425d727214f0600a04b6c234c))
|
|
41
|
+
|
|
42
|
+
## [13.0.1](https://github.com/angular-eslint/angular-eslint/compare/v13.0.0...v13.0.1) (2021-11-19)
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
- **schematics:** auto update eslint-plugin-import as part of v13 ng update ([#836](https://github.com/angular-eslint/angular-eslint/issues/836)) ([705e83b](https://github.com/angular-eslint/angular-eslint/commit/705e83b6da8e3bf77bbf00305972024f9cffd11b))
|
|
47
|
+
|
|
48
|
+
# [13.0.0](https://github.com/angular-eslint/angular-eslint/compare/v12.7.0...v13.0.0) (2021-11-18)
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
- angular-eslint v13 ([#780](https://github.com/angular-eslint/angular-eslint/issues/780)) ([f7ce631](https://github.com/angular-eslint/angular-eslint/commit/f7ce631524dd7834a422a5ac93a4c0534f9f23fa))
|
|
53
|
+
|
|
54
|
+
# [12.7.0](https://github.com/angular-eslint/angular-eslint/compare/v12.6.1...v12.7.0) (2021-11-18)
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
- update dependency ignore to v5.1.9 ([#784](https://github.com/angular-eslint/angular-eslint/issues/784)) ([e4574ce](https://github.com/angular-eslint/angular-eslint/commit/e4574ce21d9175f6fc5f27e03a0ca6f81b466a96))
|
|
59
|
+
|
|
60
|
+
### Features
|
|
61
|
+
|
|
62
|
+
- **schematics:** add package group for ng update ([#807](https://github.com/angular-eslint/angular-eslint/issues/807)) ([ce2e47d](https://github.com/angular-eslint/angular-eslint/commit/ce2e47d50a4814f5cea3e075a0c5a3e8dbbfd44e))
|
|
63
|
+
|
|
64
|
+
## [12.6.1](https://github.com/angular-eslint/angular-eslint/compare/v12.6.0...v12.6.1) (2021-10-26)
|
|
65
|
+
|
|
66
|
+
### Bug Fixes
|
|
67
|
+
|
|
68
|
+
- pin dependencies ([#726](https://github.com/angular-eslint/angular-eslint/issues/726)) ([5c21189](https://github.com/angular-eslint/angular-eslint/commit/5c211898d7a678dbc08f9c9205828ed92b28808d))
|
|
69
|
+
|
|
70
|
+
# [12.6.0](https://github.com/angular-eslint/angular-eslint/compare/v12.5.0...v12.6.0) (2021-10-25)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
73
|
+
|
|
74
|
+
# [12.5.0](https://github.com/angular-eslint/angular-eslint/compare/v12.4.1...v12.5.0) (2021-09-20)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
77
|
+
|
|
78
|
+
## [12.4.1](https://github.com/angular-eslint/angular-eslint/compare/v12.4.0...v12.4.1) (2021-09-09)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
81
|
+
|
|
82
|
+
# [12.4.0](https://github.com/angular-eslint/angular-eslint/compare/v12.3.1...v12.4.0) (2021-09-09)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
85
|
+
|
|
86
|
+
## [12.3.1](https://github.com/angular-eslint/angular-eslint/compare/v12.3.0...v12.3.1) (2021-07-15)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
89
|
+
|
|
90
|
+
# [12.3.0](https://github.com/angular-eslint/angular-eslint/compare/v12.2.2...v12.3.0) (2021-07-13)
|
|
91
|
+
|
|
92
|
+
### Features
|
|
93
|
+
|
|
94
|
+
- **schematics:** better support @angular/cli 12.1 ([#591](https://github.com/angular-eslint/angular-eslint/issues/591)) ([c5da07b](https://github.com/angular-eslint/angular-eslint/commit/c5da07b2d0c506dde24f0abc3e212db9deeaca82))
|
|
95
|
+
|
|
96
|
+
## [12.2.2](https://github.com/angular-eslint/angular-eslint/compare/v12.2.1...v12.2.2) (2021-07-10)
|
|
97
|
+
|
|
98
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
99
|
+
|
|
100
|
+
## [12.2.1](https://github.com/angular-eslint/angular-eslint/compare/v12.2.0...v12.2.1) (2021-07-10)
|
|
101
|
+
|
|
102
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
103
|
+
|
|
104
|
+
# [12.2.0](https://github.com/angular-eslint/angular-eslint/compare/v12.1.0...v12.2.0) (2021-06-20)
|
|
105
|
+
|
|
106
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
107
|
+
|
|
108
|
+
# [12.1.0](https://github.com/angular-eslint/angular-eslint/compare/v12.0.0...v12.1.0) (2021-05-30)
|
|
109
|
+
|
|
110
|
+
### Bug Fixes
|
|
111
|
+
|
|
112
|
+
- **schematics:** skip config for tsconfig.e2e.json when no e2e project is present ([#484](https://github.com/angular-eslint/angular-eslint/issues/484)) ([2673e59](https://github.com/angular-eslint/angular-eslint/commit/2673e59ec5e2708b7082fe7347ee1c96030ab6db))
|
|
113
|
+
|
|
114
|
+
### Features
|
|
115
|
+
|
|
116
|
+
- **schematics:** on `ng add` include a lint command if none exists ([#481](https://github.com/angular-eslint/angular-eslint/issues/481)) ([ae49af4](https://github.com/angular-eslint/angular-eslint/commit/ae49af4ae8af9fef306bda31e156ed4e5ddf058b))
|
|
117
|
+
|
|
118
|
+
# [12.0.0](https://github.com/angular-eslint/angular-eslint/compare/v4.3.0...v12.0.0) (2021-05-13)
|
|
119
|
+
|
|
120
|
+
### Features
|
|
121
|
+
|
|
122
|
+
- update eslint to ^7.26.0, [@typescript-eslint](https://github.com/typescript-eslint) to 4.23.0 ([9e31c38](https://github.com/angular-eslint/angular-eslint/commit/9e31c3881a13d6ce3b642b9c23c67e2e0f2d1aa1))
|
|
123
|
+
- update to angular v12 ([c80008d](https://github.com/angular-eslint/angular-eslint/commit/c80008df8f6b9d08daf3043dffc1be45f8cfbe81))
|
|
124
|
+
- update tslint-to-eslint-config to 2.4.0 ([7352ad2](https://github.com/angular-eslint/angular-eslint/commit/7352ad260644952abebf06773703f7b550d870fb))
|
|
125
|
+
|
|
126
|
+
# [4.3.0](https://github.com/angular-eslint/angular-eslint/compare/v4.2.1...v4.3.0) (2021-05-12)
|
|
127
|
+
|
|
128
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
129
|
+
|
|
130
|
+
## [4.2.1](https://github.com/angular-eslint/angular-eslint/compare/v4.2.0...v4.2.1) (2021-05-12)
|
|
131
|
+
|
|
132
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
133
|
+
|
|
134
|
+
# [4.2.0](https://github.com/angular-eslint/angular-eslint/compare/v4.1.0...v4.2.0) (2021-04-28)
|
|
135
|
+
|
|
136
|
+
### Features
|
|
137
|
+
|
|
138
|
+
- **schematics:** add add-eslint-to-project schematic ([#426](https://github.com/angular-eslint/angular-eslint/issues/426)) ([7ae557d](https://github.com/angular-eslint/angular-eslint/commit/7ae557d94f53833fbfbf5128d39f64c7bb1c3c5f))
|
|
139
|
+
|
|
140
|
+
# [4.1.0](https://github.com/angular-eslint/angular-eslint/compare/v4.0.0...v4.1.0) (2021-04-28)
|
|
141
|
+
|
|
142
|
+
### Bug Fixes
|
|
143
|
+
|
|
144
|
+
- **schematics:** support workspaces which use targets alias ([#424](https://github.com/angular-eslint/angular-eslint/issues/424)) ([da6bcf7](https://github.com/angular-eslint/angular-eslint/commit/da6bcf70027cc4b339ef2e825a931ec882d4711f))
|
|
145
|
+
|
|
146
|
+
### Features
|
|
147
|
+
|
|
148
|
+
- **schematics:** dynamically install tslint-to-eslint-config as needed ([#425](https://github.com/angular-eslint/angular-eslint/issues/425)) ([27ca474](https://github.com/angular-eslint/angular-eslint/commit/27ca474419defb79b552b233689a2dbf31b8ad92))
|
|
149
|
+
|
|
150
|
+
# [4.0.0](https://github.com/angular-eslint/angular-eslint/compare/v3.0.1...v4.0.0) (2021-04-18)
|
|
151
|
+
|
|
152
|
+
### Features
|
|
153
|
+
|
|
154
|
+
- **schematics:** options for convert-tslint-to-eslint ([#419](https://github.com/angular-eslint/angular-eslint/issues/419)) ([18fd863](https://github.com/angular-eslint/angular-eslint/commit/18fd863d6948578db96252da57702338a8ea5ea0))
|
|
155
|
+
|
|
156
|
+
## [3.0.1](https://github.com/angular-eslint/angular-eslint/compare/v3.0.0...v3.0.1) (2021-04-18)
|
|
157
|
+
|
|
158
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
159
|
+
|
|
160
|
+
# [3.0.0](https://github.com/angular-eslint/angular-eslint/compare/v2.1.1...v3.0.0) (2021-04-17)
|
|
161
|
+
|
|
162
|
+
### Features
|
|
163
|
+
|
|
164
|
+
- v3.0.0 ([#388](https://github.com/angular-eslint/angular-eslint/issues/388)) ([f92b184](https://github.com/angular-eslint/angular-eslint/commit/f92b184c5b0b57328d0a323ac8c89f1b3017b8d4))
|
|
165
|
+
|
|
166
|
+
## [2.1.1](https://github.com/angular-eslint/angular-eslint/compare/v2.1.0...v2.1.1) (2021-04-17)
|
|
167
|
+
|
|
168
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
169
|
+
|
|
170
|
+
# [2.1.0](https://github.com/angular-eslint/angular-eslint/compare/v2.0.2...v2.1.0) (2021-04-11)
|
|
171
|
+
|
|
172
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
173
|
+
|
|
174
|
+
## [2.0.2](https://github.com/angular-eslint/angular-eslint/compare/v2.0.1...v2.0.2) (2021-03-16)
|
|
175
|
+
|
|
176
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
177
|
+
|
|
178
|
+
## [2.0.1](https://github.com/angular-eslint/angular-eslint/compare/v2.0.0...v2.0.1) (2021-03-14)
|
|
179
|
+
|
|
180
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
181
|
+
|
|
182
|
+
# [2.0.0](https://github.com/angular-eslint/angular-eslint/compare/v1.2.0...v2.0.0) (2021-03-13)
|
|
183
|
+
|
|
184
|
+
### Features
|
|
185
|
+
|
|
186
|
+
- v2.0.0 ([#358](https://github.com/angular-eslint/angular-eslint/issues/358)) ([737fd04](https://github.com/angular-eslint/angular-eslint/commit/737fd04946a9533698c04665c771d944ffbe430c)), closes [#328](https://github.com/angular-eslint/angular-eslint/issues/328) [#245](https://github.com/angular-eslint/angular-eslint/issues/245)
|
|
187
|
+
|
|
188
|
+
### BREAKING CHANGES
|
|
189
|
+
|
|
190
|
+
- The format of results output has changed
|
|
191
|
+
- The rule no longer exists for use
|
|
192
|
+
|
|
193
|
+
- feat(template-parser): updated use of parseTemplate to improve loc data
|
|
194
|
+
- Requires @angular/compiler 11.2.0 and above
|
|
195
|
+
|
|
196
|
+
- feat(schematics): change way indent and quotes are handled by conversion schematics
|
|
197
|
+
- The conversion schematic handle these rules differently
|
|
198
|
+
|
|
199
|
+
# [1.2.0](https://github.com/angular-eslint/angular-eslint/compare/v1.1.0...v1.2.0) (2021-02-06)
|
|
200
|
+
|
|
201
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
202
|
+
|
|
203
|
+
# [1.1.0](https://github.com/angular-eslint/angular-eslint/compare/v1.0.0...v1.1.0) (2021-01-14)
|
|
204
|
+
|
|
205
|
+
**Note:** Version bump only for package @angular-eslint/schematics
|
|
@@ -58,14 +58,10 @@ E.g. npx ng g @angular-eslint/schematics:convert-tslint-to-eslint {{YOUR_PROJECT
|
|
|
58
58
|
tree.delete((0, core_1.join)((0, core_1.normalize)(tree.root.path), 'tslint.json'));
|
|
59
59
|
return (0, schematics_1.chain)([
|
|
60
60
|
/**
|
|
61
|
-
* Update the
|
|
61
|
+
* Update the schematicCollections to prefer @angular-eslint so that future projects within
|
|
62
62
|
* the same workspace will also use ESLint
|
|
63
63
|
*/
|
|
64
|
-
(0, utils_1.updateJsonInTree)((0, utils_1.getWorkspacePath)(tree), (json) =>
|
|
65
|
-
json.cli = json.cli || {};
|
|
66
|
-
json.cli.defaultCollection = '@angular-eslint/schematics';
|
|
67
|
-
return json;
|
|
68
|
-
}),
|
|
64
|
+
(0, utils_1.updateJsonInTree)((0, utils_1.getWorkspacePath)(tree), (json) => (0, utils_1.updateSchematicCollections)(json)),
|
|
69
65
|
(0, utils_2.uninstallTSLintAndCodelyzer)(),
|
|
70
66
|
]);
|
|
71
67
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
const dependencies_1 = require("../utils/dependencies");
|
|
7
|
+
const updatedTypeScriptESLintVersion = '5.29.0';
|
|
8
|
+
const updatedESLintVersion = '8.18.0';
|
|
9
|
+
function migration() {
|
|
10
|
+
return (0, schematics_1.chain)([
|
|
11
|
+
(0, dependencies_1.updateDependencies)([
|
|
12
|
+
{
|
|
13
|
+
packageName: '@typescript-eslint/eslint-plugin',
|
|
14
|
+
version: `^${updatedTypeScriptESLintVersion}`,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
packageName: '@typescript-eslint/experimental-utils',
|
|
18
|
+
version: `^${updatedTypeScriptESLintVersion}`,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
packageName: '@typescript-eslint/parser',
|
|
22
|
+
version: `^${updatedTypeScriptESLintVersion}`,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
packageName: 'eslint',
|
|
26
|
+
version: `^${updatedESLintVersion}`,
|
|
27
|
+
},
|
|
28
|
+
]),
|
|
29
|
+
(0, utils_1.updateJsonInTree)('angular.json', (json) => {
|
|
30
|
+
var _a;
|
|
31
|
+
// Migrate any workspaces which use the original defaultCollection (but only if set to `@angular-eslint/schematics`)
|
|
32
|
+
if (((_a = json.cli) === null || _a === void 0 ? void 0 : _a.defaultCollection) !== '@angular-eslint/schematics') {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return (0, utils_1.updateSchematicCollections)(json);
|
|
36
|
+
}),
|
|
37
|
+
// Migrate from @typescript-eslint/experimental-utils package name to @typescript-eslint/utils
|
|
38
|
+
(host, context) => (0, utils_1.updateJsonInTree)('package.json', (json) => {
|
|
39
|
+
var _a;
|
|
40
|
+
const devDep = (_a = json.devDependencies) === null || _a === void 0 ? void 0 : _a['@typescript-eslint/experimental-utils'];
|
|
41
|
+
if (!devDep) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
json.devDependencies['@typescript-eslint/utils'] = devDep;
|
|
45
|
+
delete json.devDependencies['@typescript-eslint/experimental-utils'];
|
|
46
|
+
json.devDependencies = (0, utils_1.sortObjectByKeys)(json.devDependencies);
|
|
47
|
+
host.overwrite('package.json', JSON.stringify(json, null, 2));
|
|
48
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
49
|
+
return json;
|
|
50
|
+
}),
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
53
|
+
exports.default = migration;
|
package/dist/migrations.json
CHANGED
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
"version": "13.0.0-alpha.0",
|
|
26
26
|
"description": "Updates @angular-eslint to v13",
|
|
27
27
|
"factory": "./migrations/update-13-0-0/update-13-0-0"
|
|
28
|
+
},
|
|
29
|
+
"update-14-0-0": {
|
|
30
|
+
"version": "14.0.0-alpha.0",
|
|
31
|
+
"description": "Updates @angular-eslint to v14",
|
|
32
|
+
"factory": "./migrations/update-14-0-0/update-14-0-0"
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
}
|
package/dist/ng-add/index.js
CHANGED
|
@@ -41,7 +41,7 @@ function addAngularESLintPackages() {
|
|
|
41
41
|
/**
|
|
42
42
|
* @typescript-eslint packages
|
|
43
43
|
*/
|
|
44
|
-
const typescriptESLintVersion = packageJSON.devDependencies['@typescript-eslint/
|
|
44
|
+
const typescriptESLintVersion = packageJSON.devDependencies['@typescript-eslint/utils'];
|
|
45
45
|
json.devDependencies['@typescript-eslint/eslint-plugin'] =
|
|
46
46
|
typescriptESLintVersion;
|
|
47
47
|
json.devDependencies['@typescript-eslint/parser'] = typescriptESLintVersion;
|
|
@@ -67,18 +67,14 @@ function applyESLintConfigIfSingleProjectWithNoExistingTSLint() {
|
|
|
67
67
|
* then there will be an angular.json file with a projects object, but no projects
|
|
68
68
|
* within it.
|
|
69
69
|
*
|
|
70
|
-
* In this case we should still configure the root eslint config and set the
|
|
71
|
-
*
|
|
70
|
+
* In this case we should still configure the root eslint config and set the
|
|
71
|
+
* schematicCollections to use in angular.json.
|
|
72
72
|
*/
|
|
73
73
|
const projectNames = Object.keys(angularJson.projects);
|
|
74
74
|
if (projectNames.length === 0) {
|
|
75
75
|
return (0, schematics_1.chain)([
|
|
76
76
|
(0, utils_1.updateJsonInTree)('.eslintrc.json', () => (0, utils_1.createRootESLintConfig)(null, false)),
|
|
77
|
-
(0, utils_1.updateJsonInTree)('angular.json', (json) =>
|
|
78
|
-
json.cli = json.cli || {};
|
|
79
|
-
json.cli.defaultCollection = '@angular-eslint/schematics';
|
|
80
|
-
return json;
|
|
81
|
-
}),
|
|
77
|
+
(0, utils_1.updateJsonInTree)('angular.json', (json) => (0, utils_1.updateSchematicCollections)(json)),
|
|
82
78
|
]);
|
|
83
79
|
}
|
|
84
80
|
/**
|
|
@@ -106,11 +102,7 @@ Please see https://github.com/angular-eslint/angular-eslint for more information
|
|
|
106
102
|
`.trimStart());
|
|
107
103
|
return (0, schematics_1.chain)([
|
|
108
104
|
(0, schematics_1.schematic)('add-eslint-to-project', {}),
|
|
109
|
-
(0, utils_1.updateJsonInTree)('angular.json', (json) =>
|
|
110
|
-
json.cli = json.cli || {};
|
|
111
|
-
json.cli.defaultCollection = '@angular-eslint/schematics';
|
|
112
|
-
return json;
|
|
113
|
-
}),
|
|
105
|
+
(0, utils_1.updateJsonInTree)('angular.json', (json) => (0, utils_1.updateSchematicCollections)(json)),
|
|
114
106
|
]);
|
|
115
107
|
};
|
|
116
108
|
}
|
package/dist/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ 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.determineTargetProjectHasE2E = exports.determineTargetProjectName = exports.sortObjectByKeys = exports.removeTSLintJSONForProject = exports.createESLintConfigForProject = exports.createRootESLintConfig = exports.setESLintProjectBasedOnProjectType = exports.visitNotIgnoredFiles = exports.addESLintTargetToProject = exports.updateWorkspaceInTree = exports.offsetFromRoot = exports.getProjectConfig = exports.isTSLintUsedInWorkspace = exports.getTargetsConfigFromProject = exports.getWorkspacePath = exports.updateJsonInTree = exports.readJsonInTree = void 0;
|
|
6
|
+
exports.updateSchematicCollections = exports.determineTargetProjectHasE2E = exports.determineTargetProjectName = exports.sortObjectByKeys = exports.removeTSLintJSONForProject = exports.createESLintConfigForProject = exports.createRootESLintConfig = exports.setESLintProjectBasedOnProjectType = exports.visitNotIgnoredFiles = exports.addESLintTargetToProject = exports.updateWorkspaceInTree = exports.offsetFromRoot = exports.getProjectConfig = exports.isTSLintUsedInWorkspace = exports.getTargetsConfigFromProject = exports.getWorkspacePath = exports.updateJsonInTree = exports.readJsonInTree = void 0;
|
|
7
7
|
const core_1 = require("@angular-devkit/core");
|
|
8
8
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
9
9
|
const ignore_1 = __importDefault(require("ignore"));
|
|
@@ -357,3 +357,18 @@ angularJSON, projectName) {
|
|
|
357
357
|
return !!((_a = getTargetsConfigFromProject(angularJSON.projects[projectName])) === null || _a === void 0 ? void 0 : _a.e2e);
|
|
358
358
|
}
|
|
359
359
|
exports.determineTargetProjectHasE2E = determineTargetProjectHasE2E;
|
|
360
|
+
/**
|
|
361
|
+
* See `schematicCollections` docs here:
|
|
362
|
+
* https://github.com/angular/angular-cli/blob/8431b3f0769b5f95b9e13807a09293d820c4b017/docs/specifications/schematic-collections-config.md
|
|
363
|
+
*/
|
|
364
|
+
function updateSchematicCollections(angularJson) {
|
|
365
|
+
angularJson.cli = angularJson.cli || {};
|
|
366
|
+
angularJson.cli.schematicCollections =
|
|
367
|
+
angularJson.cli.schematicCollections || [];
|
|
368
|
+
// The first matching schematic will be used, so we unshift rather than push
|
|
369
|
+
angularJson.cli.schematicCollections.unshift('@angular-eslint/schematics');
|
|
370
|
+
// Delete old defaultCollection property if applicable
|
|
371
|
+
delete angularJson.cli.defaultCollection;
|
|
372
|
+
return angularJson;
|
|
373
|
+
}
|
|
374
|
+
exports.updateSchematicCollections = updateSchematicCollections;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/schematics",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.4",
|
|
4
4
|
"description": "Angular Schematics for angular-eslint",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
"save": "devDependencies"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@angular-eslint/eslint-plugin": "14.0.0-alpha.
|
|
37
|
-
"@angular-eslint/eslint-plugin-template": "14.0.0-alpha.
|
|
36
|
+
"@angular-eslint/eslint-plugin": "14.0.0-alpha.4",
|
|
37
|
+
"@angular-eslint/eslint-plugin-template": "14.0.0-alpha.4",
|
|
38
38
|
"ignore": "5.2.0",
|
|
39
39
|
"strip-json-comments": "3.1.1",
|
|
40
40
|
"tmp": "0.2.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/tmp": "0.2.3",
|
|
44
|
-
"@typescript-eslint/
|
|
45
|
-
"eslint": "8.
|
|
44
|
+
"@typescript-eslint/utils": "5.29.0",
|
|
45
|
+
"eslint": "8.18.0",
|
|
46
46
|
"tslint-to-eslint-config": "2.4.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@angular/cli": ">= 14.0.0
|
|
49
|
+
"@angular/cli": ">= 14.0.0 < 15.0.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "c3f4612ab5834c934fc6f7b1c230eb30c049992a"
|
|
52
52
|
}
|