|
| 1 | +// @ts-check |
| 2 | + |
| 3 | +import { defineConfig } from "eslint/config"; |
| 4 | +import nextVitals from "eslint-config-next/core-web-vitals"; |
| 5 | +import betterTailwindcss from "eslint-plugin-better-tailwindcss"; |
| 6 | + |
| 7 | +// biome-ignore lint/style/noDefaultExport: Config file |
| 8 | +export default defineConfig([ |
| 9 | + // Next.js Core Web Vitals config |
| 10 | + ...nextVitals, |
| 11 | + |
| 12 | + // Better Tailwind CSS plugin configuration |
| 13 | + { |
| 14 | + plugins: { |
| 15 | + "better-tailwindcss": betterTailwindcss, |
| 16 | + }, |
| 17 | + settings: { |
| 18 | + "better-tailwindcss": { |
| 19 | + // For Tailwind CSS v4, specify the entry point to your CSS file |
| 20 | + entryPoint: "src/app/globals.css", |
| 21 | + }, |
| 22 | + }, |
| 23 | + rules: { |
| 24 | + // Tailwind CSS rules |
| 25 | + "better-tailwindcss/no-duplicate-classes": "warn", |
| 26 | + "better-tailwindcss/no-unnecessary-whitespace": "warn", |
| 27 | + "better-tailwindcss/enforce-shorthand-classes": "warn", |
| 28 | + "better-tailwindcss/no-unregistered-classes": "error", |
| 29 | + "better-tailwindcss/no-conflicting-classes": "error", |
| 30 | + |
| 31 | + // Disable formatting-related rules (Biome handles formatting) |
| 32 | + "better-tailwindcss/enforce-consistent-class-order": "off", |
| 33 | + "better-tailwindcss/enforce-consistent-line-wrapping": "off", |
| 34 | + |
| 35 | + // Disable all TypeScript ESLint rules (Biome handles TypeScript linting) |
| 36 | + "@typescript-eslint/no-require-imports": "off", |
| 37 | + "@typescript-eslint/no-unused-vars": "off", |
| 38 | + |
| 39 | + // Disable all import rules (Biome handles imports) |
| 40 | + "import/no-anonymous-default-export": "off", |
| 41 | + |
| 42 | + // Disable React stylistic rules that conflict with Biome |
| 43 | + "react/jsx-indent": "off", |
| 44 | + "react/jsx-indent-props": "off", |
| 45 | + "react/jsx-max-props-per-line": "off", |
| 46 | + "react/jsx-newline": "off", |
| 47 | + "react/jsx-one-expression-per-line": "off", |
| 48 | + "react/jsx-wrap-multilines": "off", |
| 49 | + }, |
| 50 | + }, |
| 51 | + |
| 52 | + // Global ignores |
| 53 | + { |
| 54 | + ignores: [ |
| 55 | + ".next/**", |
| 56 | + "out/**", |
| 57 | + "build/**", |
| 58 | + "dist/**", |
| 59 | + "node_modules/**", |
| 60 | + ".velite/**", |
| 61 | + "next-env.d.ts", |
| 62 | + "postcss.config.mjs", |
| 63 | + "tailwind.config.js", |
| 64 | + ], |
| 65 | + }, |
| 66 | +]); |
0 commit comments