forked from hypothesis/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
55 lines (50 loc) · 1.71 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
{
"extends": [
"hypothesis",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"prefer-arrow-callback": ["error", { "allowNamedFunctions": true }],
"object-shorthand": ["error", "properties"],
// Replaced by TypeScript's static checking.
"react/prop-types": "off",
// Upgrade TS rules from warning to error.
"@typescript-eslint/no-unused-vars": "error",
// Replace no-use-before-define with TS version, to avoid incorrect warnings.
// See https://typescript-eslint.io/rules/no-use-before-define
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"typedefs": false,
"ignoreTypeReferences": false
}
],
// Disable TS rules that we dislike.
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-this-alias": "off",
// Enforce consistency in cases where TypeScript supports old and new
// syntaxes for the same thing.
//
// - Require `<var> as <type>` for casts
// - Require `import type` for type imports. The corresponding rule for
// exports is not enabled yet because that requires setting up type-aware
// linting.
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-imports": "error"
},
"overrides": [
{
"files": ["*.js"],
"excludedFiles": ["src/**"],
"env": { "node": true },
}
]
}