-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
115 lines (115 loc) · 3.72 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
module.exports = {
root: true,
env: { node: true },
extends: [
"plugin:vue/essential",
"eslint:recommended",
"@vue/typescript/recommended"
],
parserOptions: { ecmaVersion: 2020 },
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/camelcase": "off",
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-await-in-loop": 2,
"require-atomic-updates": "warn",
"array-callback-return": "error",
"block-scoped-var": "error",
"block-spacing": "error",
"complexity": ["warn", { max: 10 }],
curly: ["warn", "multi", "consistent"],
"default-param-last": "error",
"dot-location": ["error", "property"],
"dot-notation": ["error", { "allowPattern": "id" }],
eqeqeq: ["error", "smart"],
"guard-for-in": "warn",
"max-classes-per-file": ["error", 1],
"no-alert": process.env.NODE_ENV === "production" ? "error" : "warn",
"no-else-return": "error",
"no-empty-function": "warn",
"no-multi-spaces": "error",
"no-multi-str": "warn",
"no-new": "error",
"no-new-func": "error",
"no-self-compare": "error",
"no-useless-return": "error",
"no-shadow": "error",
camelcase: "error",
"comma-dangle": "error",
"comma-spacing": [
"error",
{
before: false,
after: true
}
],
"consistent-this": ["error", "that"],
"func-call-spacing": ["error", "never"],
"function-call-argument-newline": ["error", "consistent"],
"implicit-arrow-linebreak": ["error", "beside"],
indent: ["error", 4],
"jsx-quotes": ["error", "prefer-double"],
"key-spacing": [
"error",
{
afterColon: true,
mode: "strict"
}
],
"keyword-spacing": ["error", { before: true }],
"max-len": [
"error",
{
code: 100,
tabWidth: 4,
ignoreTrailingComments: true,
ignoreUrls: true,
ignorePattern:
"((import|require) (.*?))|((.*?)\\((.*?)\\): (.*?) \\{)"
}
],
"max-lines": ["error", 600],
"max-lines-per-function": [
"error",
{
max: 20,
skipBlankLines: true,
skipComments: true
}
],
"max-nested-callbacks": ["error", 3],
"new-parens": "error",
"no-multi-assign": "error",
"no-trailing-spaces": [
"error",
{
skipBlankLines: true,
ignoreComments: true
}
],
"object-curly-newline": ["error", { multiline: true }],
"object-curly-spacing": ["error", "always"],
"object-property-newline": "error",
"padded-blocks": ["error", "never"],
quotes: ["error", "double", { allowTemplateLiterals: true }],
semi: ["error", "always"],
"semi-style": ["error", "last"],
"no-var": "error",
"prefer-const": "error",
"prefer-template": "error",
yoda: "error"
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
env: { jest: true }
}
]
};