Skip to content

Commit 9fe0916

Browse files
committed
feat: use ng lint schematic to configure project
1 parent a5e0289 commit 9fe0916

File tree

4 files changed

+56
-45
lines changed

4 files changed

+56
-45
lines changed

packages/igx-templates/igx-ts/projects/_base/files/angular.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
"lint": {
112112
"builder": "@angular-eslint/builder:lint",
113113
"options": {
114-
"eslintConfig": "eslint.config.mjs",
115114
"lintFilePatterns": [
116115
"src/**/*.ts",
117116
"src/**/*.html"
@@ -121,7 +120,9 @@
121120
}
122121
}
123122
},
124-
"cli": {
125-
"schematicCollections": ["@angular-eslint/schematics"]
126-
}
123+
"cli": {
124+
"schematicCollections": [
125+
"@angular-eslint/schematics"
126+
]
127+
}
127128
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// @ts-check
2+
const eslint = require("@eslint/js");
3+
const tseslint = require("typescript-eslint");
4+
const angular = require("angular-eslint");
5+
6+
module.exports = tseslint.config(
7+
{
8+
files: ["**/*.ts"],
9+
extends: [
10+
eslint.configs.recommended,
11+
...tseslint.configs.recommended,
12+
...tseslint.configs.stylistic,
13+
...angular.configs.tsRecommended,
14+
],
15+
processor: angular.processInlineTemplates,
16+
rules: {
17+
"@angular-eslint/directive-selector": [
18+
"error",
19+
{
20+
type: "attribute",
21+
prefix: "app",
22+
style: "camelCase",
23+
},
24+
],
25+
"@angular-eslint/component-selector": [
26+
"error",
27+
{
28+
type: "element",
29+
prefix: "app",
30+
style: "kebab-case",
31+
},
32+
],
33+
// Relax rules
34+
"@typescript-eslint/no-explicit-any": "off",
35+
"@angular-eslint/prefer-inject": "warn",
36+
},
37+
},
38+
{
39+
files: ["**/*.html"],
40+
extends: [
41+
...angular.configs.templateRecommended,
42+
// ...angular.configs.templateAccessibility,
43+
],
44+
rules: {
45+
},
46+
}
47+
);

packages/igx-templates/igx-ts/projects/_base/files/eslint.config.mjs

Lines changed: 0 additions & 29 deletions
This file was deleted.

packages/igx-templates/igx-ts/projects/_base/files/package.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,19 @@
3535
},
3636
"devDependencies": {
3737
"@angular-devkit/build-angular": "~20.3.0",
38-
"@angular-eslint/builder": "~20.3.0",
39-
"@angular-eslint/eslint-plugin": "~20.3.0",
40-
"@angular-eslint/eslint-plugin-template": "~20.3.0",
41-
"@angular-eslint/schematics": "~20.3.0",
42-
"@angular-eslint/template-parser": "~20.3.0",
4338
"@angular/cli": "~20.3.0",
4439
"@angular/compiler-cli": "~20.3.0",
4540
"@types/jasmine": "~5.1.4",
46-
"@typescript-eslint/eslint-plugin": "~8.45.0",
47-
"@typescript-eslint/parser": "~8.45.0",
48-
"eslint": "~9.36.0",
49-
"eslint-plugin-import": "^2.32.0",
50-
"eslint-plugin-prefer-arrow": "^1.2.3",
51-
"eslint-plugin-unicorn": "^61.0.2",
41+
"angular-eslint": "~20.3.0",
42+
"eslint": "~9.35.0",
5243
"igniteui-cli": "~<%=cliVersion%>",
5344
"jasmine-core": "~5.11.0",
5445
"karma": "~6.4.4",
5546
"karma-chrome-launcher": "~3.2.0",
5647
"karma-coverage": "~2.2.1",
5748
"karma-jasmine": "~5.1.0",
5849
"karma-jasmine-html-reporter": "~2.1.0",
59-
"typescript": "~5.9.2"
50+
"typescript": "~5.9.2",
51+
"typescript-eslint": "~8.40.0"
6052
}
6153
}

0 commit comments

Comments
 (0)