33 lines
922 B
JavaScript
33 lines
922 B
JavaScript
import eslint from "@eslint/js";
|
|
import pluginReact from "eslint-plugin-react";
|
|
import reactCompiler from "eslint-plugin-react-compiler";
|
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
import { defineConfig } from "eslint/config";
|
|
import globals from "globals";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default defineConfig([
|
|
eslint.configs.recommended,
|
|
{
|
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
languageOptions: { globals: globals.browser },
|
|
},
|
|
tseslint.configs.recommended,
|
|
pluginReact.configs.flat.recommended,
|
|
reactHooks.configs["recommended-latest"],
|
|
reactCompiler.configs.recommended,
|
|
{
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
rules: {
|
|
"react/react-in-jsx-scope": "off",
|
|
},
|
|
},
|
|
]);
|