forked from LuanRoger/electron-shadcn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
32 lines (30 loc) · 1.04 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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import eslintPluginPrettierRecommended from "eslint-config-prettier";
import reactCompiler from "eslint-plugin-react-compiler";
import path from "node:path";
import { includeIgnoreFile } from "@eslint/compat";
import { fileURLToPath } from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const prettierIgnorePath = path.resolve(__dirname, ".prettierignore");
/** @type {import('eslint').Linter.Config[]} */
export default [
includeIgnoreFile(prettierIgnorePath),
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
plugins: {
"react-compiler": reactCompiler,
},
rules: {
"react-compiler/react-compiler": "error",
},
},
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
pluginReact.configs.flat.recommended,
eslintPluginPrettierRecommended,
...tseslint.configs.recommended,
];