-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
117 lines (117 loc) · 4.1 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
109
110
111
112
113
114
115
116
117
{
"root": false,
"ignorePatterns": ["projects/**/*", "**/*.spec.ts", "**/*-routing.module.ts", "src/main.ts", "src/main.server.ts", "src/polyfills.ts", "src/test.ts"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["**/tsconfig.json"],
"sourceType": "module",
"createDefaultProgram": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@angular-eslint/component-max-inline-declarations": "error",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/no-attribute-decorator": "error",
"@angular-eslint/no-forward-ref": "off",
"@angular-eslint/no-lifecycle-call": "error",
"@angular-eslint/no-pipe-impure": "error",
"@angular-eslint/no-queries-metadata-property": "error",
"@angular-eslint/prefer-output-readonly": "error",
"@angular-eslint/use-component-selector": "error",
"@angular-eslint/use-component-view-encapsulation": "error",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/unbound-method": "off",
"class-methods-use-this": "off",
"import/no-extraneous-dependencies": "off",
"import/no-internal-modules": "off",
"import/no-unassigned-import": "off",
"import/order": "error",
"no-constant-condition": "off",
"no-empty": "error",
"comma-dangle": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/explicit-member-accessibility": "warn",
"@typescript-eslint/naming-convention": "off",
"no-console": "off",
"no-restricted-syntax": [
"error",
{
"selector": "CallExpression[callee.object.name='console'][callee.property.name!=/^(warn|error|info|trace)$/]",
"message": "Only warn, error, info and trace allowed to be committed into code"
}
],
"max-len": [
"error",
{
"code": 160,
"ignoreUrls": true
}
],
"no-else-return": "error",
"array-bracket-spacing": "error",
"block-spacing": [2, "always"],
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"comma-spacing": [2, { "before": false, "after": true }],
"no-whitespace-before-property": "error",
"radix": "off",
"@typescript-eslint/member-ordering": [
2,
{
"default": [
"decorated-field", // = ["public-decorated-field", "protected-decorated-field", "private-decorated-field"]
"field",
"public-constructor",
"public-method", // = ["public-static-method", "public-instance-method"]
"protected-method", // = ["protected-static-method", "protected-instance-method"]
"private-method" // = ["private-static-method", "private-instance-method"]
]
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"@angular-eslint/template/cyclomatic-complexity": "off"
},
"parserOptions": {
"project": ["./tsconfig.json"]
}
},
{
"files": ["*.d.ts"],
"rules": {
"@typescript-eslint/naming-convention": "off",
"max-len": "off"
}
}
]
}