@angular-eslint/schematics 20.7.1-alpha.0 → 21.0.1-alpha.0
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/application/schema.json +19 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +11 -10
- package/package.json +5 -5
|
@@ -54,15 +54,19 @@
|
|
|
54
54
|
"description": "The type of stylesheet files to be created for components in the application.",
|
|
55
55
|
"type": "string",
|
|
56
56
|
"default": "css",
|
|
57
|
-
"enum": ["css", "scss", "sass", "less"],
|
|
57
|
+
"enum": ["css", "scss", "sass", "less", "tailwind"],
|
|
58
58
|
"x-prompt": {
|
|
59
|
-
"message": "Which stylesheet
|
|
59
|
+
"message": "Which stylesheet system would you like to use?",
|
|
60
60
|
"type": "list",
|
|
61
61
|
"items": [
|
|
62
62
|
{
|
|
63
63
|
"value": "css",
|
|
64
64
|
"label": "CSS [ https://developer.mozilla.org/docs/Web/CSS ]"
|
|
65
65
|
},
|
|
66
|
+
{
|
|
67
|
+
"value": "tailwind",
|
|
68
|
+
"label": "Tailwind CSS [ https://tailwindcss.com ]"
|
|
69
|
+
},
|
|
66
70
|
{
|
|
67
71
|
"value": "scss",
|
|
68
72
|
"label": "Sass (SCSS) [ https://sass-lang.com/documentation/syntax#scss ]"
|
|
@@ -85,6 +89,12 @@
|
|
|
85
89
|
"default": false,
|
|
86
90
|
"alias": "S"
|
|
87
91
|
},
|
|
92
|
+
"testRunner": {
|
|
93
|
+
"description": "The unit testing runner to use.",
|
|
94
|
+
"type": "string",
|
|
95
|
+
"enum": ["vitest", "karma"],
|
|
96
|
+
"default": "vitest"
|
|
97
|
+
},
|
|
88
98
|
"skipPackageJson": {
|
|
89
99
|
"type": "boolean",
|
|
90
100
|
"default": false,
|
|
@@ -120,9 +130,14 @@
|
|
|
120
130
|
},
|
|
121
131
|
"zoneless": {
|
|
122
132
|
"description": "Generate an application that does not use `zone.js`.",
|
|
123
|
-
"x-prompt": "Do you want to create a 'zoneless' application without zone.js?",
|
|
124
133
|
"type": "boolean",
|
|
125
|
-
"default":
|
|
134
|
+
"default": true
|
|
135
|
+
},
|
|
136
|
+
"fileNameStyleGuide": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"enum": ["2016", "2025"],
|
|
139
|
+
"default": "2025",
|
|
140
|
+
"description": "The file naming convention to use for generated files. The '2025' style guide (default) uses a concise format (e.g., `app.ts` for the root component), while the '2016' style guide includes the type in the file name (e.g., `app.component.ts`). For more information, see the Angular Style Guide (https://angular.dev/style-guide)."
|
|
126
141
|
},
|
|
127
142
|
"setParserOptionsProject": {
|
|
128
143
|
"type": "boolean",
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAS/E,eAAO,MAAM,wBAAwB,UAOpC,CAAC;AAEF;;;;;GAKG;AAEH,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAcnE;AAED;;;;;GAKG;AAEH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,EAC7C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,KAAK,CAAC,GAClD,IAAI,CAYN;AAED,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE3E,wBAAgB,2BAA2B,CACzC,aAAa,EAAE;IAAE,SAAS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E;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,uBAUvC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CA8BT;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAuBrE;AAED,wBAAgB,kDAAkD,CAChE,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,GAClB;IACD,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb,CAmCA"}
|
package/dist/utils.js
CHANGED
|
@@ -232,17 +232,18 @@ function createRootESLintConfig(prefix) {
|
|
|
232
232
|
function createStringifiedRootESLintConfig(prefix, isESM) {
|
|
233
233
|
return `// @ts-check
|
|
234
234
|
${isESM ? 'import eslint from "@eslint/js";' : 'const eslint = require("@eslint/js");'}
|
|
235
|
+
${isESM ? 'import { defineConfig } from "eslint/config";' : 'const { defineConfig } = require("eslint/config");'}
|
|
235
236
|
${isESM ? 'import tseslint from "typescript-eslint";' : 'const tseslint = require("typescript-eslint");'}
|
|
236
237
|
${isESM ? 'import angular from "angular-eslint";' : 'const angular = require("angular-eslint");'}
|
|
237
238
|
|
|
238
|
-
${isESM ? 'export default' : 'module.exports ='}
|
|
239
|
+
${isESM ? 'export default' : 'module.exports ='} defineConfig([
|
|
239
240
|
{
|
|
240
241
|
files: ["**/*.ts"],
|
|
241
242
|
extends: [
|
|
242
243
|
eslint.configs.recommended,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
tseslint.configs.recommended,
|
|
245
|
+
tseslint.configs.stylistic,
|
|
246
|
+
angular.configs.tsRecommended,
|
|
246
247
|
],
|
|
247
248
|
processor: angular.processInlineTemplates,
|
|
248
249
|
rules: ${prefix
|
|
@@ -269,12 +270,12 @@ ${isESM ? 'export default' : 'module.exports ='} tseslint.config(
|
|
|
269
270
|
{
|
|
270
271
|
files: ["**/*.html"],
|
|
271
272
|
extends: [
|
|
272
|
-
|
|
273
|
-
|
|
273
|
+
angular.configs.templateRecommended,
|
|
274
|
+
angular.configs.templateAccessibility,
|
|
274
275
|
],
|
|
275
276
|
rules: {},
|
|
276
277
|
}
|
|
277
|
-
);
|
|
278
|
+
]);
|
|
278
279
|
`;
|
|
279
280
|
}
|
|
280
281
|
function createProjectESLintConfig(projectRoot, projectType, prefix, setParserOptionsProject, hasE2e) {
|
|
@@ -312,10 +313,10 @@ function createProjectESLintConfig(projectRoot, projectType, prefix, setParserOp
|
|
|
312
313
|
function createStringifiedProjectESLintConfig(projectRoot, projectType, prefix, setParserOptionsProject, hasE2e, isESM, rootConfigPath) {
|
|
313
314
|
const relativeRootConfigPath = offsetFromRoot(projectRoot) + rootConfigPath;
|
|
314
315
|
return `// @ts-check
|
|
315
|
-
${isESM ? 'import
|
|
316
|
+
${isESM ? 'import { defineConfig } from "eslint/config";' : 'const { defineConfig } = require("eslint/config");'}
|
|
316
317
|
${isESM ? `import rootConfig from "${relativeRootConfigPath}";` : `const rootConfig = require("${relativeRootConfigPath}");`}
|
|
317
318
|
|
|
318
|
-
${isESM ? 'export default' : 'module.exports ='}
|
|
319
|
+
${isESM ? 'export default' : 'module.exports ='} defineConfig([
|
|
319
320
|
...rootConfig,
|
|
320
321
|
{
|
|
321
322
|
files: ["**/*.ts"],${setParserOptionsProject
|
|
@@ -349,7 +350,7 @@ ${isESM ? 'export default' : 'module.exports ='} tseslint.config(
|
|
|
349
350
|
files: ["**/*.html"],
|
|
350
351
|
rules: {},
|
|
351
352
|
}
|
|
352
|
-
);
|
|
353
|
+
]);
|
|
353
354
|
`;
|
|
354
355
|
}
|
|
355
356
|
function createESLintConfigForProject(projectName, setParserOptionsProject) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/schematics",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.1-alpha.0",
|
|
4
4
|
"description": "Angular Schematics for angular-eslint",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"save": "devDependencies"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@angular-devkit/core": ">=
|
|
40
|
-
"@angular-devkit/schematics": ">=
|
|
39
|
+
"@angular-devkit/core": ">= 21.0.0 < 22.0.0",
|
|
40
|
+
"@angular-devkit/schematics": ">= 21.0.0 < 22.0.0",
|
|
41
41
|
"ignore": "7.0.5",
|
|
42
42
|
"semver": "7.7.3",
|
|
43
43
|
"strip-json-comments": "3.1.1",
|
|
44
|
-
"@angular-eslint/eslint-plugin": "
|
|
45
|
-
"@angular-eslint/eslint-plugin-template": "
|
|
44
|
+
"@angular-eslint/eslint-plugin": "21.0.1-alpha.0",
|
|
45
|
+
"@angular-eslint/eslint-plugin-template": "21.0.1-alpha.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@typescript-eslint/utils": "8.46.4",
|