-
Notifications
You must be signed in to change notification settings - Fork 21
/
.eslintrc.json
96 lines (90 loc) · 2.6 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
{
"env": {
"browser": true,
"node": false,
"es6": true
},
"ignorePatterns": [
"*.config.js",
"*-config.cjs",
"/public/service-worker.js"
],
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
"plugin:tailwindcss/recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2022,
"project": ["./tsconfig.json"]
},
"rules": {
"no-empty": ["error", { "allowEmptyCatch": true }],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_"
}
],
"@typescript-eslint/no-misused-promises": "warn",
// not included into recommended set rules
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{ "prefer": "type-imports" }
],
"@typescript-eslint/require-await": "off",
"sort-imports": "off", // we use TypeScripts' organize imports feature
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": [
"error",
{ "checkArrowFunctions": false }
],
"@typescript-eslint/sort-type-union-intersection-members": "warn",
"jsx-a11y/media-has-caption": 0,
// not enforced by prettier
"lines-between-class-members": [
"warn",
"always",
{ "exceptAfterSingleLine": true }
],
"tailwindcss/classnames-order": [
"warn",
{
"officialSorting": true,
"config": "tailwind.config.js"
}
],
"react/no-unknown-property": [
2,
{
"ignore": ["jsx", "global"]
}
]
},
"settings": {
"tailwindcss": {
"config": "tailwind.config.js"
}
}
}