-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
40 lines (38 loc) · 1.15 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
import { FlatCompat } from "@eslint/eslintrc";
import eslint from "@eslint/js";
import jsxA11y from "eslint-plugin-jsx-a11y";
import perfectionist from "eslint-plugin-perfectionist";
import prettier from "eslint-plugin-prettier/recommended";
import react from "eslint-plugin-react";
import tailwind from "eslint-plugin-tailwindcss";
import ts from "typescript-eslint";
// FlatCompat convert old definition to the new ones
const compat = new FlatCompat();
export default [
{
ignores: ["build/*", "node_modules/*"],
},
...ts.config(
eslint.configs.recommended,
...ts.configs.strict,
...ts.configs.stylistic,
react.configs.flat.recommended,
react.configs.flat["jsx-runtime"], // Avoid having the React-in-jsx-scope rule activated
...compat.config({
extends: ["plugin:react-hooks/recommended"],
rules: {
"react-hooks/exhaustive-deps": "error",
},
}),
jsxA11y.flatConfigs.recommended,
perfectionist.configs["recommended-alphabetical"],
prettier,
...tailwind.configs["flat/recommended"],
{
rules: {
"arrow-body-style": ["error", "always"],
curly: "error",
},
},
),
];