-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy patheslint.config.mjs
90 lines (86 loc) · 2.13 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
89
90
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
import tailwind from "eslint-plugin-tailwindcss";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
const eslintConfig = [
...tailwind.configs["flat/recommended"],
...compat.config(
{
extends: [
"next/core-web-vitals",
"next/typescript",
"prettier"
],
rules: {
"no-console": "error",
"no-await-in-loop": "error",
"no-return-await": "error",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
vars: "all",
args: "after-used",
ignoreRestSiblings: true,
argsIgnorePattern: "^_",
caughtErrors: "none", // This allows unused catch parameters
},
]
},
ignorePatterns: [
"/utils",
"/public/static/scripts/",
"/__tests__/api/",
"node_modules/",
"dist/",
"coverage/",
],
settings: {
tailwindcss: {
whitelist: [
"(gc\\-).*",
"(gcds\\-).*",
"form-builder",
"form-builder-editor",
"page-container",
"visually-hidden",
"buttons",
"required",
"focus-group",
"canada-flag",
"account-wrapper",
"input-sizer",
"stacked",
"disabled",
"origin-radix-dropdown-menu",
"radio-label-text",
"checkbox-label-text",
"example-text",
"section",
"maple-leaf-loader",
"flow-container",
"rich-text-wrapper",
"editor",
"editor-input",
"link-editor",
"link-input",
"choice",
"text-entry",
"action",
"wave",
"bkd-soft",
"legend-fieldset",
"confirmation",
"active"
],
},
},
}),
];
export default eslintConfig;