import { defineConfig, type OxlintConfig } from "oxlint"; export const jsxA11yConfig: OxlintConfig = defineConfig({ plugins: ["jsx-a11y"], rules: { "jsx-a11y/alt-text": "error", "jsx-a11y/anchor-ambiguous-text": "error", "jsx-a11y/anchor-has-content": "error", "jsx-a11y/anchor-is-valid": "error", "jsx-a11y/aria-activedescendant-has-tabindex": "error", "jsx-a11y/aria-props": "error", "jsx-a11y/aria-proptypes": "error", "jsx-a11y/aria-role": "error", "jsx-a11y/aria-unsupported-elements": "error", "jsx-a11y/autocomplete-valid": "error", "jsx-a11y/click-events-have-key-events": "error", "jsx-a11y/control-has-associated-label": "error", "jsx-a11y/heading-has-content": "error", "jsx-a11y/html-has-lang": "error", "jsx-a11y/iframe-has-title": "error", "jsx-a11y/img-redundant-alt": ["error", { components: ["img", "Image"] }], "jsx-a11y/interactive-supports-focus": "error", "jsx-a11y/label-has-associated-control": "error", "jsx-a11y/lang": "error", "jsx-a11y/media-has-caption": "error", "jsx-a11y/mouse-events-have-key-events": "error", // Access keys are exceptionally uncommon and may still be used intentionally. "jsx-a11y/no-access-key": "off", "jsx-a11y/no-aria-hidden-on-focusable": "error", // Autofocus should be used appropriately rather than prohibited entirely. "jsx-a11y/no-autofocus": "off", // Distracting legacy elements are exceptionally uncommon. "jsx-a11y/no-distracting-elements": "off", "jsx-a11y/no-interactive-element-to-noninteractive-role": "error", "jsx-a11y/no-noninteractive-element-interactions": "error", "jsx-a11y/no-noninteractive-element-to-interactive-role": "error", "jsx-a11y/no-noninteractive-tabindex": "error", "jsx-a11y/no-redundant-roles": "error", "jsx-a11y/no-static-element-interactions": "error", "jsx-a11y/prefer-tag-over-role": "error", "jsx-a11y/role-has-required-aria-props": "error", "jsx-a11y/role-supports-aria-props": "error", "jsx-a11y/scope": "error", "jsx-a11y/tabindex-no-positive": "error", }, });