forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
134 lines (133 loc) · 4.14 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
{
"root": true,
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"ignorePatterns": [
"bazel-out",
"dist-schema",
"goldens/public-api",
"modules/testing/builder/projects",
"packages/angular_devkit/build_angular/src/babel-bazel.d.ts",
"packages/angular_devkit/build_angular/test",
"packages/angular_devkit/build_webpack/test",
"packages/angular_devkit/schematics_cli/blank/project-files",
"packages/angular_devkit/schematics_cli/blank/schematic-files",
"packages/angular_devkit/schematics_cli/schematic/files",
"**/tests",
".yarn",
"dist",
"**/node_modules",
"**/third_party"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": ["eslint-plugin-import", "header", "@typescript-eslint"],
"rules": {
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unused-expressions": "error",
"curly": "error",
"header/header": [
"error",
"block",
[
"*",
" * @license",
" * Copyright Google LLC All Rights Reserved.",
" *",
" * Use of this source code is governed by an MIT-style license that can be",
" * found in the LICENSE file at https://angular.dev/license",
" "
],
2
],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-absolute-path": "error",
"import/no-duplicates": "error",
"import/no-extraneous-dependencies": ["off", { "devDependencies": false }],
"import/no-unassigned-import": ["error", { "allow": ["symbol-observable"] }],
"import/order": [
"error",
{
"alphabetize": { "order": "asc" },
"groups": [["builtin", "external"], "parent", "sibling", "index"]
}
],
"max-len": [
"error",
{
"code": 140,
"ignoreUrls": true
}
],
"max-lines-per-function": ["error", { "max": 200 }],
"no-caller": "error",
"no-console": "error",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-eval": "error",
"no-multiple-empty-lines": ["error"],
"no-throw-literal": "error",
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": "return"
}
],
"sort-imports": ["error", { "ignoreDeclarationSort": true }],
"spaced-comment": [
"error",
"always",
{
"markers": ["/"]
}
],
/* TODO: evaluate usage of these rules and fix issues as needed */
"no-case-declarations": "off",
"no-fallthrough": "off",
"no-underscore-dangle": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/no-base-to-string": "off"
},
"overrides": [
{
"files": ["!packages/**", "**/*_spec.ts"],
"rules": {
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"max-lines-per-function": "off",
"no-console": "off"
}
}
]
}