-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.js
96 lines (96 loc) · 2.91 KB
/
.eslintrc.js
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
module.exports = {
root: true,
env: {
// "browser": true,
"es6": true,
"node": true,
},
extends: [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
// "google",
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["tsconfig.json", "tsconfig.dev.json"],
tsconfigRootDir: __dirname,
sourceType: "module",
},
ignorePatterns: [
"/lib/**/*", // Ignore built files.
// '.eslintrc.js' // !!! new and important part !!!
],
plugins: [
"eslint-plugin-import",
"@typescript-eslint",
"@typescript-eslint/tslint",
"import",
],
rules: {
"import/no-unresolved": 0,
"@typescript-eslint/no-extra-semi": "warn",
"@typescript-eslint/no-require-imports": "error", // required to deploy to Google Cloud Functions
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-namespace": "error",
"no-param-reassign": "error",
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
}
],
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unified-signatures": "warn",
"constructor-super": "error",
"eqeqeq": [
"warn",
"smart"
],
"import/no-deprecated": "warn",
"import/no-extraneous-dependencies": "error",
"import/no-unassigned-import": "warn",
"no-cond-assign": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
"no-invalid-this": "error",
"no-new-wrappers": "error",
"no-redeclare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "error",
"no-void": "error",
"prefer-const": "error",
"@typescript-eslint/restrict-template-expressions": [
"error",
{
"allowNumber": true,
"allowBoolean": false,
"allowAny": false,
"allowNullish": false
},
],
"@typescript-eslint/tslint/config": [
"error",
{
"rules": {
}
}
]
}
};