31 lines
952 B
JavaScript
31 lines
952 B
JavaScript
import pluginReact from "eslint-plugin-react";
|
|
import pluginReactHooks from "eslint-plugin-react-hooks";
|
|
import pluginReactRefresh from "eslint-plugin-react-refresh";
|
|
import pluginReactRecommended from "eslint-plugin-react/configs/recommended";
|
|
import globals from "globals";
|
|
import baseConfig from "../eslint.config";
|
|
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
export default [
|
|
...baseConfig,
|
|
pluginReactRecommended,
|
|
pluginReactHooks,
|
|
{
|
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
plugins: {
|
|
react: pluginReact,
|
|
"react-refresh": pluginReactRefresh,
|
|
},
|
|
languageOptions: {
|
|
parserOptions: {
|
|
ecmaFeatures: "latest",
|
|
sourceType: "module",
|
|
project: ["./tsconfig.json"],
|
|
tsconfigRootDir: "./",
|
|
},
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
},
|
|
},
|
|
];
|