This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy path.eslintrc
84 lines (84 loc) · 2.23 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
{
"extends": [
"yoast",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"env": {
"jest": true
},
"rules": {
"new-cap": 0,
"complexity": [
2,
10
],
"@typescript-eslint/no-parameter-properties": [
2,
{
"allows": [
"protected readonly",
"private readonly"
]
}
],
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false
}
],
"no-constant-condition": [
"error",
{
"checkLoops": false
}
],
"max-statements": [
2,
33
],
// Normal no-unused-vars doesn't work for TypeScript
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [ "error", { "varsIgnorePattern": "^createElement$" } ],
// Duplicate class members are overloads and are allowed in TypeScript
"no-dupe-class-members": "off",
// Normal indent doesn't work for TypeScript
"indent": "off",
"@typescript-eslint/indent": [
2,
"tab",
{
"SwitchCase": 1
}
],
// Allow space before async arrow function
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
// Types are already defined by TypeScript, no need in JSDoc.
"valid-jsdoc": [
"error",
{
"requireReturn": false,
"requireReturnType": false,
"requireParamType": false
}
],
// We use `wp.element.createElement` instead of the `react` package directly.
"react/react-in-jsx-scope": 0
}
}