-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
63 lines (56 loc) · 1.28 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
import { resolve, dirname } from "node:path";
import { fileURLToPath } from 'node:url';
import js from "@eslint/js";
import ts from "typescript-eslint";
import tailwind from "eslint-plugin-tailwindcss";
import astro from "eslint-plugin-astro";
import playwright from "eslint-plugin-playwright";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
/**
* @type {import("eslint").ESLint.ConfigData}
*/
export default [
js.configs.recommended,
...ts.configs.recommended,
...tailwind.configs["flat/recommended"],
{
...astro.configs["flat/jsx-a11y-recommended"],
files: ["*.astro"],
},
{
...playwright.configs["flat/recommended"],
files: ["*.spec.ts"]
},
{
rules: {
// ESLint
"quotes": ["error", "double"],
"semi": "error",
"indent": ["error", "tab"],
// Astro.js
"astro/jsx-a11y/alt-text": "off",
// TailwindCSS
"tailwindcss/no-custom-classname": ["warn", {
whitelist: ["input-required"]
}],
// @typescript-eslint
"@typescript-eslint/triple-slash-reference": "off"
}
},
{
settings: {
tailwindcss: {
config: resolve(__dirname, "./apps/web/tailwind.config.ts"),
},
},
},
{
ignores: [
"**/.astro/**/*.*",
"**/.wrangler/**/*.*",
"**/.vercel/**/*.*",
"**/dist/**/*.*",
],
}
];