-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
73 lines (73 loc) · 1.93 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"next",
"next/core-web-vitals",
"eslint:recommended",
"plugin:tailwindcss/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended", // needed?
"prettier"
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"tailwindcss",
"react",
"react-hooks",
"eslint-plugin-react",
"@typescript-eslint",
"prettier"
],
"rules": {
// Tailwind
"tailwindcss/no-custom-classname": "off",
// Prettier
"prettier/prettier": ["error", { "semi": false }], // including this also respects printWidth?
// ESLint
"quotes": [2, "single", { "avoidEscape": true }],
"@typescript-eslint/no-explicit-any": "warn",
"object-curly-spacing": ["warn", "always"],
"semi": ["error", "never"],
"no-multi-spaces": ["error"],
"no-trailing-spaces": ["warn"],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_"
}
],
// React
"react/prop-types": "off",
"react/jsx-boolean-value": "warn",
"react/jsx-curly-brace-presence": "warn",
"react/jsx-fragments": "warn",
"react/jsx-no-useless-fragment": "warn",
"react/jsx-uses-vars": "error",
"react/prefer-stateless-function": "warn",
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off"
},
"settings": {
"tailwindcss": {
"callees": ["cn", "cva"],
"config": "tailwind.config.js"
},
"react": {
"version": "detect"
}
}
}