-
Notifications
You must be signed in to change notification settings - Fork 205
/
.eslintrc
113 lines (101 loc) · 3.36 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
},
"extends": [
"xo",
"plugin:jest/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"prettier"
],
"plugins": ["jest", "@typescript-eslint", "eslint-plugin-jsdoc", "import"],
"rules": {
"import/no-extraneous-dependencies": 2,
/* xo config */
// makes commenting out lines quickly a hassle
"capitalized-comments": 0,
"camelcase": 0,
"default-param-last": 0,
"complexity": ["error", { "max": 25 }],
"no-unused-vars": "off",
/* 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/explicit-module-boundary-types": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-unnecessary-type-arguments": 2,
"@typescript-eslint/no-unnecessary-type-assertion": 2,
"@typescript-eslint/no-unnecessary-boolean-literal-compare": 2,
"@typescript-eslint/no-unnecessary-qualifier": 2,
"@typescript-eslint/no-this-alias": 2,
"@typescript-eslint/no-useless-constructor": 2,
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/prefer-reduce-type-parameter": 2,
"@typescript-eslint/prefer-as-const": 2,
"@typescript-eslint/prefer-for-of": 2,
"@typescript-eslint/prefer-optional-chain": 2,
"@typescript-eslint/prefer-readonly": 2,
"@typescript-eslint/array-type": [2, { "default": "array-simple" }],
"@typescript-eslint/no-unused-vars": ["error"],
// 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": [
2,
{
"contexts": ["TSPropertySignature", "ClassProperty"],
"require": {
"ArrowFunctionExpression": true,
"FunctionDeclaration": true,
"ClassDeclaration": true,
"MethodDefinition": true
}
}
]
},
"overrides": [
{
"files": ["*.test.*"],
"rules": {
"import/no-extraneous-dependencies": 0,
"import/namespace": 0,
"no-import-assign": 0,
"@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
}
}
]
}