-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
99 lines (98 loc) · 3.43 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
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "jasmine"],
"rules": {
"no-fallthrough": "off",
"no-constant-condition": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": ["warn", { "allowArgumentsExplicitlyTypedAsAny": true }],
"object-curly-spacing": ["error", "always"],
"quotes": ["error", "double"]
},
"overrides": [
{
"files": ["**.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": ["plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates"],
"rules": {
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": ["Page", "Component"]
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-unused-vars": "off",
"no-undef": "off"
}
},
{
"files": ["*.html", "*.component.html", "*.page.html"],
"parserOptions": {
"project": ["tsconfig.(app|spec).json"]
},
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"max-len": ["warn", { "code": 120 }]
}
},
{
"files": ["*.spec.ts"],
"rules": {
"@typescript-eslint/no-unused-vars": "off", // Disable unused variable rule since it might be common in spec files
"@typescript-eslint/no-empty-function": "off", // Disable rule that disallows empty functions
"@typescript-eslint/no-explicit-any": "warn", // Disable rule that disallows the use of 'any' type
"@typescript-eslint/explicit-module-boundary-types": "off", // Disable rule that enforces explicit return types on functions
"jasmine/no-focused-tests": "warn", // Warn about focused tests (tests using fdescribe, fit, etc.)
"jasmine/no-disabled-tests": "warn", // Warn about disabled tests (tests using xdescribe, xit, etc.)
"jasmine/no-spec-dupes": "warn", // Warn about duplicated test suites
"jasmine/no-suite-dupes": "warn" // Warn about duplicated test cases
}
},
{
"files": ["*.component.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["@angular-eslint/template", "prettier"],
"processor": "@angular-eslint/template/extract-inline-html"
}
]
}