import js from "@eslint/js"; import reactHooks from "eslint-plugin-react-hooks"; import jsxA11y from "eslint-plugin-jsx-a11y"; import globals from "globals"; export default [ { ignores: ["dist/**"] }, { files: ["src/**/*.{js,jsx}"], languageOptions: { ecmaVersion: "latest", sourceType: "module", globals: { ...globals.browser, }, parserOptions: { ecmaFeatures: { jsx: true }, }, }, plugins: { "react-hooks": reactHooks, "jsx-a11y": jsxA11y, }, rules: { ...js.configs.recommended.rules, "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", "jsx-a11y/alt-text": "warn", "jsx-a11y/anchor-has-content": "warn", "jsx-a11y/aria-role": "warn", "no-unused-vars": [ "warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^([A-Z_]|Lu)", caughtErrorsIgnorePattern: "^_", }, ], }, }, ];