import { defineConfig, globalIgnores } from "eslint/config"; import nextVitals from "eslint-config-next/core-web-vitals"; import nextTs from "eslint-config-next/typescript"; import jsxA11y from "eslint-plugin-jsx-a11y"; const eslintConfig = defineConfig([ ...nextVitals, ...nextTs, { rules: { // Enable recommended jsx-a11y rules (plugin already included in nextVitals) ...jsxA11y.configs.recommended.rules, // Enforce stricter accessibility rules "jsx-a11y/anchor-is-valid": "error", "jsx-a11y/alt-text": "error", "jsx-a11y/aria-props": "error", "jsx-a11y/aria-proptypes": "error", "jsx-a11y/aria-unsupported-elements": "error", "jsx-a11y/role-has-required-aria-props": "error", "jsx-a11y/role-supports-aria-props": "error", "jsx-a11y/label-has-associated-control": "error", "jsx-a11y/click-events-have-key-events": "warn", "jsx-a11y/no-static-element-interactions": "warn", "jsx-a11y/interactive-supports-focus": "warn", // TypeScript strict rules - prohibit 'any' type usage "@typescript-eslint/no-explicit-any": "error", }, }, // Override default ignores of eslint-config-next. globalIgnores([ // Default ignores of eslint-config-next: ".next/**", "out/**", "build/**", "next-env.d.ts", ]), ]); export default eslintConfig;