-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
106 lines (106 loc) · 3.08 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
{
"extends": ["next/core-web-vitals", "prettier", "plugin:storybook/recommended"],
"ignorePatterns": ["./*", "node_modules", ".next", "storybook-static"],
"plugins": ["import", "unused-imports", "@typescript-eslint", "n"],
"rules": {
"@next/next/no-img-element": "off",
"eol-last": ["error", "always"],
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "useSparseCallback"
}
],
"no-restricted-imports": [
"error",
{
"patterns": ["@/app/blog/*", "**/*.stories"],
"paths": [
{
"name": "tailwind-merge",
"message": "Please import from @/lib/tailwind/merge instead."
},
{
"name": "tailwind-variants",
"message": "Please import from @/lib/tailwind/variants instead."
}
]
}
],
"no-restricted-exports": [
"error",
{
"restrictDefaultExports": {
"direct": true,
"named": true,
"defaultFrom": true,
"namedFrom": true,
"namespaceFrom": true
}
}
],
"unused-imports/no-unused-imports": "error",
"import/order": [
"warn",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"object",
"index",
"type"
],
"newlines-between": "always",
"pathGroupsExcludedImportTypes": ["builtin"],
"alphabetize": { "order": "asc", "caseInsensitive": true },
"pathGroups": [
{
"pattern": "{react,react-node}",
"group": "external",
"position": "before"
},
{
"pattern": "next**",
"group": "external",
"position": "before"
},
{ "pattern": "@/env", "group": "internal", "position": "before" },
{ "pattern": "@/app/**", "group": "internal", "position": "before" },
{ "pattern": "@/components/**", "group": "internal", "position": "before" },
{ "pattern": "@/data/**", "group": "internal", "position": "before" },
{ "pattern": "@/hooks/**", "group": "internal", "position": "before" },
{ "pattern": "@/lib/**", "group": "internal", "position": "before" },
{ "pattern": "@/styles/**", "group": "internal", "position": "before" },
{ "pattern": "@blog/**", "group": "internal", "position": "before" }
]
}
],
"n/no-process-env": "error"
},
"overrides": [
{
"files": ["**/?(*.)+(spec|test).[jt]s?(x)"],
"extends": ["plugin:testing-library/react"]
},
{
"files": [
"apps/trpfrog.net/src/app/**/{page,layout,route,loading,not-found,opengraph-image}.{js,jsx,ts,tsx}", // Next.js
"*.stories.{js,jsx,ts,tsx}", // Storybook
"*.config.{js,ts}", // Config files
"vitest.*.ts"
],
"rules": {
"no-restricted-exports": "off"
}
},
{
"files": ["*.config.{js,ts}"],
"rules": {
"n/no-process-env": "off"
}
}
]
}