1
- import angularEslintPlugin from "@angular-eslint/eslint-plugin" ;
2
- import angularEslintPluginTemplate from "@angular-eslint/eslint-plugin-template" ;
3
- import angularEslintTemplateParser from "@angular-eslint/template-parser" ;
4
1
import js from "@eslint/js" ;
5
- import prettier from "eslint-config-prettier " ;
2
+ import angularEslint from "angular-eslint " ;
6
3
import deprecation from "eslint-plugin-deprecation" ;
7
4
import globals from "globals" ;
8
5
import tseslint from "typescript-eslint" ;
9
6
10
- export default [
11
- js . configs . recommended ,
7
+ export default tseslint . config (
12
8
{ ignores : [ "dist/" , ".angular/" , "**/*.js" ] } ,
13
9
{
14
10
files : [ "**/*.ts" ] ,
11
+ extends : [
12
+ js . configs . recommended ,
13
+ ...tseslint . configs . strictTypeChecked ,
14
+ ...tseslint . configs . stylisticTypeChecked ,
15
+ ...angularEslint . configs . tsRecommended ,
16
+ ] ,
15
17
languageOptions : {
16
18
parser : tseslint . parser ,
17
19
parserOptions : {
@@ -25,22 +27,9 @@ export default [
25
27
...globals . browser ,
26
28
} ,
27
29
} ,
28
- plugins : {
29
- "@typescript-eslint" : tseslint . plugin ,
30
- deprecation,
31
- "@angular-eslint" : angularEslintPlugin ,
32
- } ,
33
- processor : angularEslintPluginTemplate . processors [ "extract-inline-html" ] ,
30
+ plugins : { deprecation } ,
31
+ processor : angularEslint . processInlineTemplates ,
34
32
rules : {
35
- ...Object . assign (
36
- { } ,
37
- ...tseslint . configs . strictTypeChecked . map ( ( { rules } ) => rules ) ,
38
- ) ,
39
- ...Object . assign (
40
- { } ,
41
- ...tseslint . configs . stylisticTypeChecked . map ( ( { rules } ) => rules ) ,
42
- ) ,
43
- ...angularEslintPlugin . configs . recommended . rules ,
44
33
"@typescript-eslint/no-extraneous-class" : "off" ,
45
34
"no-unused-vars" : "off" ,
46
35
"@typescript-eslint/no-unused-vars" : "error" ,
@@ -59,16 +48,9 @@ export default [
59
48
} ,
60
49
{
61
50
files : [ "**/*.html" ] ,
62
- plugins : {
63
- "@angular-eslint/template" : angularEslintPluginTemplate ,
64
- } ,
65
- languageOptions : {
66
- parser : angularEslintTemplateParser ,
67
- } ,
51
+ extends : [ ...angularEslint . configs . templateRecommended ] ,
68
52
rules : {
69
- ...angularEslintPluginTemplate . configs . recommended . rules ,
70
53
"@angular-eslint/template/prefer-control-flow" : "error" ,
71
54
} ,
72
55
} ,
73
- prettier ,
74
- ] ;
56
+ ) ;
0 commit comments