/* cSpell:disable */ import { type Linter } from 'eslint'; import { type NonEmptyTuple, type ReadonlyRecord, type UnknownRecord, } from 'ts-type-forge'; type SpreadOptionsIfIsArray< T extends readonly [Linter.StringSeverity, unknown], > = T[1] extends readonly unknown[] ? readonly [Linter.StringSeverity, ...T[1]] : T; /** * @description Enforce emojis are wrapped in `` and provide screen reader access. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | true | * ``` */ namespace AccessibleEmoji { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": {} * } * ] * ``` */ export type RuleEntry = 0; } /** * @description Enforce all elements that require alternative text have meaningful information to relay back to end user. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AltText { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "elements": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "img": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "object": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "area": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "input[type=\"image\"]": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * } * } * } * ] * ``` */ export type Options = Readonly<{ elements?: readonly string[]; img?: readonly string[]; object?: readonly string[]; area?: readonly string[]; 'input[type="image"]'?: readonly string[]; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce `` text to not exactly match "click here", "here", "link", or "a link". * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AnchorAmbiguousText { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "words": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * } * } * } * ] * ``` */ export type Options = Readonly<{ words?: readonly string[]; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce all anchors to contain accessible content. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AnchorHasContent { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "components": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * } * } * } * ] * ``` */ export type Options = Readonly<{ components?: readonly string[]; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce all anchors are valid, navigable elements. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AnchorIsValid { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "components": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "specialLink": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "aspects": { * "type": "array", * "items": { * "type": "string", * "enum": [ * "noHref", * "invalidHref", * "preferButton" * ] * }, * "uniqueItems": true, * "additionalItems": false, * "minItems": 1 * } * } * } * ] * ``` */ export type Options = Readonly<{ components?: readonly string[]; specialLink?: readonly string[]; /** * @minItems 1 */ aspects?: NonEmptyTuple<'noHref' | 'invalidHref' | 'preferButton'>; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce elements with aria-activedescendant are tabbable. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AriaActivedescendantHasTabindex { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": {} * } * ] * ``` */ export type Options = UnknownRecord; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce all `aria-*` props are valid. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AriaProps { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": {} * } * ] * ``` */ export type Options = UnknownRecord; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce ARIA state and property values are valid. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AriaProptypes { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": {} * } * ] * ``` */ export type Options = UnknownRecord; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AriaRole { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "allowedInvalidRoles": { * "items": { * "type": "string" * }, * "type": "array", * "uniqueItems": true * }, * "ignoreNonDOM": { * "type": "boolean", * "default": false * } * } * } * ] * ``` */ export type Options = Readonly<{ allowedInvalidRoles?: readonly string[]; /** * @default false */ ignoreNonDOM?: boolean; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AriaUnsupportedElements { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": {} * } * ] * ``` */ export type Options = UnknownRecord; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce that autocomplete attributes are used correctly. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace AutocompleteValid { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "inputComponents": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * } * } * } * ] * ``` */ export type Options = Readonly<{ inputComponents?: readonly string[]; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce a clickable non-interactive element has at least one keyboard event listener. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace ClickEventsHaveKeyEvents { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": {} * } * ] * ``` */ export type Options = UnknownRecord; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce that a control (an interactive element) has a text label. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace ControlHasAssociatedLabel { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "labelAttributes": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "controlComponents": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "ignoreElements": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "ignoreRoles": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "depth": { * "description": "JSX tree depth limit to check for accessible label", * "type": "integer", * "minimum": 0 * } * } * } * ] * ``` */ export type Options = Readonly<{ labelAttributes?: readonly string[]; controlComponents?: readonly string[]; ignoreElements?: readonly string[]; ignoreRoles?: readonly string[]; /** * JSX tree depth limit to check for accessible label */ depth?: number; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce heading (`h1`, `h2`, etc) elements contain accessible content. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace HeadingHasContent { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "components": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * } * } * } * ] * ``` */ export type Options = Readonly<{ components?: readonly string[]; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce `` element has `lang` prop. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace HtmlHasLang { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": {} * } * ] * ``` */ export type Options = UnknownRecord; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce iframe elements have a title attribute. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace IframeHasTitle { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": {} * } * ] * ``` */ export type Options = UnknownRecord; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce `` alt prop does not contain the word "image", "picture", or "photo". * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace ImgRedundantAlt { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "components": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "words": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * } * } * } * ] * ``` */ export type Options = Readonly<{ components?: readonly string[]; words?: readonly string[]; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce that elements with interactive handlers like `onClick` must be focusable. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace InteractiveSupportsFocus { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "tabbable": { * "type": "array", * "items": { * "type": "string", * "enum": [ * "button", * "checkbox", * "columnheader", * "combobox", * "grid", * "gridcell", * "link", * "listbox", * "menu", * "menubar", * "menuitem", * "menuitemcheckbox", * "menuitemradio", * "option", * "progressbar", * "radio", * "radiogroup", * "row", * "rowheader", * "scrollbar", * "searchbox", * "slider", * "spinbutton", * "switch", * "tab", * "tablist", * "textbox", * "tree", * "treegrid", * "treeitem", * "doc-backlink", * "doc-biblioref", * "doc-glossref", * "doc-noteref" * ] * }, * "uniqueItems": true, * "additionalItems": false, * "minItems": 0 * } * } * } * ] * ``` */ export type Options = Readonly<{ /** * @minItems 0 */ tabbable?: readonly ( | 'button' | 'checkbox' | 'columnheader' | 'combobox' | 'grid' | 'gridcell' | 'link' | 'listbox' | 'menu' | 'menubar' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'option' | 'progressbar' | 'radio' | 'radiogroup' | 'row' | 'rowheader' | 'scrollbar' | 'searchbox' | 'slider' | 'spinbutton' | 'switch' | 'tab' | 'tablist' | 'textbox' | 'tree' | 'treegrid' | 'treeitem' | 'doc-backlink' | 'doc-biblioref' | 'doc-glossref' | 'doc-noteref' )[]; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce that a `label` tag has a text label and an associated control. * @link https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md * * ```md * | key | value | * | :--------- | :---- | * | deprecated | false | * ``` */ namespace LabelHasAssociatedControl { /** * ### schema * * ```json * [ * { * "type": "object", * "properties": { * "labelComponents": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "labelAttributes": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "controlComponents": { * "type": "array", * "items": { * "type": "string" * }, * "uniqueItems": true, * "additionalItems": false * }, * "assert": { * "description": "Assert that the label has htmlFor, a nested label, both or either", * "type": "string", * "enum": [ * "htmlFor", * "nesting", * "both", * "either" * ] * }, * "depth": { * "description": "JSX tree depth limit to check for accessible label", * "type": "integer", * "minimum": 0 * } * } * } * ] * ``` */ export type Options = Readonly<{ labelComponents?: readonly string[]; labelAttributes?: readonly string[]; controlComponents?: readonly string[]; /** * Assert that the label has htmlFor, a nested label, both or either */ assert?: 'htmlFor' | 'nesting' | 'both' | 'either'; /** * JSX tree depth limit to check for accessible label */ depth?: number; [k: string]: unknown; }>; export type RuleEntry = | 'off' | Linter.Severity | SpreadOptionsIfIsArray; } /** * @description Enforce that `