-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
30 lines (26 loc) · 992 Bytes
/
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
// @ts-check
import { FlatCompat } from "@eslint/eslintrc";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import i18next from "eslint-plugin-i18next";
import reactPlugin from "eslint-plugin-react";
import { fileURLToPath } from "url";
import path from "path";
// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
export default tseslint.config(
{ ignores: [".yarn", ".react-router", ".pnp.cjs"] },
{ settings: { react: { version: "detect" } } },
eslint.configs.recommended,
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat["jsx-runtime"],
...compat.extends("plugin:react-hooks/recommended"),
...compat.extends("plugin:drizzle/recommended"),
// @ts-expect-error Mommy and Daddy are fighting
i18next.configs["flat/recommended"],
tseslint.configs.recommended
);