-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.json
55 lines (55 loc) · 1.71 KB
/
.eslintrc.json
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
{
"root": true,
"plugins": ["eslint-plugin-expect-type", "prefer-arrow", "jest"],
"parserOptions": {
// Required by eslint-plugin-expect-type.
//
// typescript-eslint currently [does not support project
// references](https://github.com/typescript-eslint/typescript-eslint/issues/2094),
// so linting requires building first.
"project": "./tsconfig.base.json"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/base",
"plugin:@typescript-eslint/eslint-recommended",
"prettier",
"plugin:eslint-plugin-expect-type/recommended",
"plugin:eslint-comments/recommended"
],
"rules": {
// Fix "eslint:recommended".
"no-ex-assign": "off",
// Rules that prevent unused code.
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "ignoreRestSiblings": true }
],
"eslint-comments/no-unused-disable": "error",
"no-useless-rename": "error",
"object-shorthand": "error",
"no-constant-condition": "off",
"@typescript-eslint/no-unnecessary-condition": [
"error",
{ "allowConstantLoopConditions": true }
],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"jest/no-disabled-tests": "error",
"jest/no-focused-tests": "error",
// Consistency rules.
"prefer-arrow/prefer-arrow-functions": "error",
"arrow-body-style": "error",
"no-restricted-syntax": [
"error",
{
"selector": "ExportDefaultDeclaration",
"message": "Prefer named exports"
}
],
"curly": "error",
"no-use-before-define": "error",
"@typescript-eslint/no-confusing-void-expression": "error"
}
}