-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.json
108 lines (108 loc) · 3.01 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
"root": true,
"parserOptions": {
"ecmaVersion": "latest",
"project": true
},
"env": {
"es6": true
},
"ignorePatterns": ["dist/**/*", "generators/**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": [
"airbnb-base",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:import/typescript",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:@typescript-eslint/recommended-type-checked",
"prettier"
],
"overrides": [
{
"files": ["*.spec.ts"],
"rules": {
"max-lines-per-function": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/consistent-type-assertions": "off"
}
}
],
"rules": {
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never",
"js": "never",
"jsx": "never"
}
],
"unused-imports/no-unused-imports": "error",
"no-empty-function": "error",
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "never" }],
"@typescript-eslint/no-explicit-any": "error",
"class-methods-use-this": "off",
"dot-notation": "off",
"@typescript-eslint/explicit-function-return-type": "error",
"lines-between-class-members": [
"error",
{
"enforce": [
{ "blankLine": "always", "prev": "*", "next": "method" },
{ "blankLine": "always", "prev": "method", "next": "*" }
]
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"constructors": "off"
}
}
],
"@typescript-eslint/no-inferrable-types": "error",
"max-lines-per-function": ["error", { "max": 40, "skipBlankLines": true, "skipComments": true }],
"curly": ["error", "all"],
"import/prefer-default-export": "off",
"@typescript-eslint/no-floating-promises": "off",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
},
"settings": {
"import/resolver": {
"alias": {
"extensions": [".ts", ".js", ".jsx", ".json"],
"map": [["@", "./src"]]
}
}
},
"plugins": ["unused-imports"]
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}