-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
126 lines (126 loc) · 3.8 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
{
"env": {
"browser": true,
"es2023": true
},
"extends": [
"plugin:@wordpress/eslint-plugin/recommended"
],
"settings": {
"import/resolver": "typescript"
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"overrides": [
{
"files": ["webpack.config.js"],
"env": {
"node": true
},
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
],
"rules": {
"consistent-return": "off",
"dot-notation": "off",
"init-declarations": "off",
"max-params": "off",
"no-throw-literal": "off",
"no-useless-constructor": "off",
"prefer-promise-reject-errors": "off",
"no-return-await": "off",
"no-undef-init": "error",
"no-implicit-globals": "error",
"max-depth": ["error", 2],
"max-lines": ["error", {"max": 300, "skipBlankLines": false, "skipComments": false}],
"max-statements-per-line": ["error", {"max": 1}],
"complexity": ["error", 2],
"max-lines-per-function": ["error", 25],
"max-nested-callbacks": ["error", 2],
"no-multiple-empty-lines": ["error", {"max": 1, "maxEOF": 1, "maxBOF": 0}],
"max-classes-per-file": ["error", 1],
"@typescript-eslint/consistent-indexed-object-style": "warn",
"@typescript-eslint/prefer-literal-enum-member": "warn",
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/no-useless-template-literals": "error",
"@typescript-eslint/prefer-find": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-readonly-parameter-types": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-mixed-enums": "error",
"@typescript-eslint/prefer-enum-initializers": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/init-declarations": [
"error",
"always"
],
"@typescript-eslint/consistent-generic-constructors": [
"error",
"type-annotation"
],
"@typescript-eslint/array-type": [
"warn",
{
"default": "generic"
}
],
"@typescript-eslint/parameter-properties": [
"warn",
{
"prefer": "parameter-property"
}
],
"@typescript-eslint/max-params": [
"error",
{
"max": 3
}
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "separate-type-imports"
}
],
"@typescript-eslint/method-signature-style": [
"error",
"property"
],
"@wordpress/dependency-group": "error",
"@wordpress/i18n-text-domain": [
"error",
{
"allowedTextDomain": "konomi"
}
]
}
}