-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
62 lines (61 loc) · 1.46 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
const isProduction = process.env.NODE_ENV === "production";
module.exports = {
root: true,
env: {
node: true,
browser: true
},
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: 2020,
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".ts", ".d.ts"],
paths: ["node_modules/", "node_modules/@types/"],
}
}
},
extends: [
"plugin:@typescript-eslint/recommended",
"google",
],
plugins: [
"@typescript-eslint",
],
rules: {
"no-console": isProduction ? 2 : 1,
"import/extensions": 0,
"@typescript-eslint/type-annotation-spacing": 2,
"indent": ["error", 4],
"max-len": ["error", 100],
"quotes": ["error", "double"],
"operator-linebreak": [2, "before"],
"require-jsdoc": 0,
"object-curly-spacing": [2, "always"],
"valid-jsdoc": 0,
},
overrides: [
{
files: [
"bin/**/*.js",
"demo/**/*.js",
],
rules: {
"@typescript-eslint/no-var-requires": 0,
"no-console": 0,
}
},
{
files: [
"tests/**/*",
],
rules: {
"max-len": 0
}
}
]
};