import eslint from "@eslint/js"; import globals from "globals"; import jsxA11y from "eslint-plugin-jsx-a11y"; import react from "eslint-plugin-react"; import reactHooks from "eslint-plugin-react-hooks"; import tseslint from "typescript-eslint"; export default tseslint.config( { ignores: ["dist/**", "node_modules/**"] }, eslint.configs.recommended, ...tseslint.configs.recommended, react.configs.flat.recommended, react.configs.flat["jsx-runtime"], jsxA11y.flatConfigs.recommended, { files: ["src/**/*.{ts,tsx}"], languageOptions: { globals: globals.browser, parserOptions: { ecmaFeatures: { jsx: true } }, }, plugins: { "react-hooks": reactHooks }, settings: { react: { version: "detect" } }, rules: { "jsx-a11y/label-has-associated-control": ["error", { depth: 4 }], "no-alert": "error", "no-eval": "error", "no-undef": "off", "no-unused-vars": "off", "react/no-danger": "error", "react/prop-types": "off", "react-hooks/exhaustive-deps": "warn", "react-hooks/rules-of-hooks": "error", "@typescript-eslint/no-explicit-any": "error", "@typescript-eslint/no-non-null-assertion": "warn", "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_", ignoreRestSiblings: true, varsIgnorePattern: "^_", }], }, }, );