-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
69 lines (65 loc) · 1.44 KB
/
eslint.config.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
import config from "@antfu/eslint-config";
import { fixupConfigRules } from "@eslint/compat";
import { FlatCompat } from "@eslint/eslintrc";
import jsxA11y from "eslint-plugin-jsx-a11y";
import * as regexp from "eslint-plugin-regexp";
import security from "eslint-plugin-security";
import tailwind from "eslint-plugin-tailwindcss";
export const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
resolvePluginsRelativeTo: import.meta.dirname,
});
export default config(
{
astro: {
overrides: {
"antfu/no-top-level-await": "off",
},
},
formatters: {
css: true,
markdown: "dprint",
},
ignores: [
"**/.*",
"**/*.d.ts",
".astro",
".editorconfig",
".github",
".vercel",
"/internal/",
"src/generated/",
"postcss.config.cjs",
],
react: true,
stylistic: {
indent: 2,
quotes: "double",
},
typescript: {
tsconfigPath: "tsconfig.json",
},
},
{
rules: {
"style/semi": "off",
},
},
jsxA11y.flatConfigs.strict,
regexp.configs["flat/recommended"],
...tailwind.configs["flat/recommended"],
{
rules: {
"tailwindcss/no-custom-classname": "off",
},
settings: {
tailwindcss: {
callees: ["classnames", "clsx", "cn", "cva"],
},
},
},
...fixupConfigRules(
compat.extends("plugin:typescript-sort-keys/recommended"),
),
security.configs.recommended,
);