-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
109 lines (102 loc) · 2.81 KB
/
.eslintrc.js
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
module.exports = {
root: true,
extends: [
"next",
"next/core-web-vitals",
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:testing-library/react",
"plugin:jest-dom/recommended",
"plugin:@tanstack/eslint-plugin-query/recommended",
"plugin:tailwindcss/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
plugins: [
"react",
"jsx-a11y",
"@typescript-eslint",
"testing-library",
"jest-dom",
"@tanstack/query",
"prettier",
],
overrides: [
{
files: ["*.ts", "*.tsx", "*.js"],
parser: "@typescript-eslint/parser",
},
],
rules: {
"react/react-in-jsx-scope": "off",
"import/order": "off",
"prettier/prettier": "off",
"react/prop-types": "off",
"tailwindcss/no-custom-classname": "off",
// imports
"import/no-unresolved": "error",
"no-restricted-imports": [
"warn",
{
patterns: ["@/features/*/*"],
},
],
"prettier/prettier": [
"warn",
{
endOfLine: "auto",
},
{ usePrettierrc: true },
],
"@typescript-eslint/no-unused-vars": ["warn"],
"@typescript-eslint/explicit-function-return-type": ["off"],
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
// React testing library
"testing-library/await-async-queries": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": "off",
"testing-library/no-await-sync-events": [
"error",
{
eventModules: ["fire-event"],
},
],
"@tanstack/query/exhaustive-deps": "warn",
"@tanstack/query/stable-query-client": "warn",
"jsx-a11y/label-has-associated-control": [1],
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
},
tailwindcss: {
// These are the default values but feel free to customize
callees: ["classnames", "clsx", "ctl"],
config: "tailwind.config.js", // returned from `loadConfig()` utility if not provided
cssFiles: [
"**/*.css",
"!**/node_modules",
"!**/.*",
"!**/dist",
"!**/build",
],
cssFilesRefreshRate: 5_000,
removeDuplicates: true,
skipClassAttribute: false,
whitelist: [],
tags: [], // can be set to e.g. ['tw'] for use in tw`bg-blue`
classRegex: "^class(Name)?$", // can be modified to support custom attributes. E.g. "^tw$" for `twin.macro`
},
},
};