eslint.config.js (35 lines of code) (raw):
import js from "@eslint/js";
import globals from "globals";
import reactPlugin from "eslint-plugin-react";
import reactHooksPlugin from "eslint-plugin-react-hooks";
export default [
js.configs.recommended,
{
files: ["frontend/**/*.{js,jsx}"],
plugins: {
react: reactPlugin,
"react-hooks": reactHooksPlugin,
},
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
rules: {
"react/react-in-jsx-scope": "off",
"react/jsx-uses-vars": "error",
},
settings: {
react: {
version: "detect",
},
},
},
];