import js from "@eslint/js"; import globals from "globals"; import react from "eslint-plugin-react"; import reactHooks from "eslint-plugin-react-hooks"; import tseslint from "typescript-eslint"; import prettier from "eslint-config-prettier"; export default [ { ignores: ["dist", "node_modules"] }, { files: ["**/*.{js,jsx,ts,tsx}"], languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, }, js.configs.recommended, ...tseslint.configs.recommendedTypeChecked, { files: ["**/*.{ts,tsx}"], languageOptions: { parserOptions: { ecmaVersion: 2020, sourceType: "module", ecmaFeatures: { jsx: true, }, projectService: true, tsconfigRootDir: import.meta.dirname, }, }, plugins: { react, "react-hooks": reactHooks, }, rules: { ...react.configs.recommended.rules, ...reactHooks.configs.recommended.rules, "react/react-in-jsx-scope": "off", "@typescript-eslint/no-explicit-any": "warn", "@typescript-eslint/no-unused-expressions": "off", }, settings: { react: { version: "detect", }, }, }, prettier, ];