-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.eslintrc
99 lines (88 loc) · 2.67 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
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
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
},
"extends": [
"xo",
"plugin:jest/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"plugins": ["prettier", "jest", "@typescript-eslint", "eslint-plugin-jsdoc"],
"rules": {
/* xo config */
// makes commenting out lines quickly a hassle
"capitalized-comments": 0,
"default-param-last": 0,
"complexity": ["error", { "max": 25 }],
/* jest plugin */
"jest/prefer-strict-equal": 2,
"jest/prefer-spy-on": 2,
"jest/no-standalone-expect": 2,
"jest/no-try-expect": 2,
"jest/no-export": 2,
"jest/no-truthy-falsy": 1,
"jest/no-duplicate-hooks": 1,
"jest/no-if": 1,
"jest/prefer-to-have-length": 1,
/* typescript */
"no-undef": 0,
"@typescript-eslint/no-this-alias": 2,
"@typescript-eslint/no-unnecessary-type-assertion": 2,
"@typescript-eslint/no-useless-constructor": 2,
// if we turn this on babel adds regeneratorRuntime which makes builds harder and larger
"@typescript-eslint/promise-function-async": 0,
// just rely on typescript inference
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/interface-name-prefix": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
/* jsdoc settings */
"jsdoc/check-alignment": 1,
"jsdoc/check-param-names": 1,
"jsdoc/check-tag-names": 1,
"jsdoc/implements-on-classes": 1,
"jsdoc/newline-after-description": 1,
"jsdoc/no-types": 1,
"jsdoc/require-param-description": 1,
"jsdoc/require-returns-check": 1,
"jsdoc/require-returns-description": 1,
"jsdoc/require-hyphen-before-param-description": [1, "always"],
"jsdoc/require-jsdoc": [
0,
{
"contexts": ["TSPropertySignature", "ClassProperty"],
"require": {
"ArrowFunctionExpression": true,
"FunctionDeclaration": true,
"ClassDeclaration": true,
"MethodDefinition": true
}
}
]
},
"overrides": [
{
"files": ["*.test.*"],
"rules": {
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-explicit-any": 0,
"require-atomic-updates": 0,
"max-nested-callbacks": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"jsdoc/require-jsdoc": 0
}
},
{
"files": ["packages/test/**/*.*"],
"rules": {
"jest/no-export": 0
}
}
]
}