-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
88 lines (76 loc) · 2.03 KB
/
eslint.config.mjs
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
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import nextPlugin from "@next/eslint-plugin-next"
import tseslint from "@typescript-eslint/eslint-plugin"
import tsParser from "@typescript-eslint/parser"
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"
import tailwind from "eslint-plugin-tailwindcss"
/** @type {import("eslint").Linter.Config[]} */
const eslintConfig = [
{
plugins: {
"@next/next": nextPlugin,
},
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs["core-web-vitals"].rules,
},
files: ["**/*.{mjs,ts,tsx}"],
},
...tailwind.configs["flat/recommended"],
{
settings: {
tailwindcss: {
callees: ["cn", "cva"],
},
},
},
{
plugins: {
"@typescript-eslint": tseslint,
},
languageOptions: {
parser: tsParser,
parserOptions: {
project: "tsconfig.json",
},
},
rules: {
...tseslint.configs["recommended-type-checked"].rules,
...tseslint.configs["stylistic-type-checked"].rules,
"@next/next/no-html-link-for-pages": "off",
"@next/next/no-img-element": "off",
"tailwindcss/no-custom-classname": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: {
attributes: false,
},
},
],
},
},
{
ignores: [".next"],
},
eslintPluginPrettierRecommended,
]
export default eslintConfig