-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc
More file actions
67 lines (63 loc) · 1.99 KB
/
.eslintrc
File metadata and controls
67 lines (63 loc) · 1.99 KB
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
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
// Uses the recommended rules from the @typescript-eslint/eslint-plugin
"plugin:@typescript-eslint/recommended",
// Disable conflicting rules with prettier
"prettier",
// Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"arrow-parens": ["error", "as-needed"],
"camelcase": "warn",
"comma-dangle": ["error", "never"],
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"max-classes-per-file": ["error", 1],
"no-console": "error",
"no-shadow": "warn",
"no-duplicate-imports": "error",
"no-unused-expressions": "off", // disable for chai assertions
"no-dupe-class-members": "off", // typescript signature overload
"no-undef": "off", // typescript already check this
"no-var": "error",
"prefer-const": [
"error",
{
"destructuring": "all"
}
],
"prefer-destructuring": [
"error",
{
"array": true,
"object": true
}
],
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"quote-props": ["error", "as-needed"],
"require-atomic-updates": "off",
// typescript
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-use-before-define": "off"
}
}