import js from "@eslint/js" import globals from "globals" import reactHooks from "eslint-plugin-react-hooks" import reactRefresh from "eslint-plugin-react-refresh" import jsxA11y from "eslint-plugin-jsx-a11y" import tseslint from "typescript-eslint" import prettierConfig from "eslint-config-prettier" export default tseslint.config( { ignores: ["dist", "dist-tsbuild", "node_modules", "coverage"] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ["**/*.{ts,tsx}"], languageOptions: { ecmaVersion: 2022, globals: globals.browser }, plugins: { "react-hooks": reactHooks, "react-refresh": reactRefresh, "jsx-a11y": jsxA11y, }, rules: { ...reactHooks.configs.recommended.rules, ...jsxA11y.configs.recommended.rules, "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], }, }, { files: ["**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}"], rules: { "@typescript-eslint/no-explicit-any": "off", }, }, { // shadcn/ui generated components — third-party patterns, a11y rules relaxed files: ["src/shared/ui/**/*.{ts,tsx}"], rules: { "jsx-a11y/heading-has-content": "off", "jsx-a11y/click-events-have-key-events": "off", "jsx-a11y/no-noninteractive-element-interactions": "off", "jsx-a11y/no-static-element-interactions": "off", "react-refresh/only-export-components": "off", }, }, { // TanStack Table column defs — meta cell renderers can have click handlers files: ["src/features/**/components/*Columns.tsx"], rules: { "jsx-a11y/click-events-have-key-events": "off", "jsx-a11y/no-static-element-interactions": "off", }, }, prettierConfig )