-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
62 lines (61 loc) · 2.1 KB
/
.eslintrc
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
{
"extends": ["plugin:import/warnings", "plugin:import/typescript", "plugin:unicorn/recommended"],
"plugins": ["@typescript-eslint", "import", "promise", "unicorn"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"sourceType": "module",
"ecmaVersion": 12
},
"rules": {
"prefer-const": "error",
"semi": ["error", "always"],
"quotes": ["warn", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
"no-unused-vars": "off",
"curly": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
// our use of `-spec` files for testing prevents us using this
"unicorn/filename-case": "off",
// reduce has been getting a bad rap lately; its true that often
// a filter or map would be clearer and equally as effective but
// there are still some legit cases to use reduce
"unicorn/no-array-reduce": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/no-null": "off",
"no-nested-ternary": "off",
// doesn't play well with prettier
"unicorn/no-nested-ternary": "off",
// this is kind of nice sometimes
"unicorn/no-array-callback-reference": "off",
// we need exceptions to be only "warn" because
// there are valid use cases for generic variables being
// used before being defined
"no-use-before-define": ["warn"],
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
// "cases" allows for graceful use of that variable
// name in Typescript test cases
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "cases|^_",
"argsIgnorePattern": "^_"
}
]
}
}