@markuplint/rules 5.0.0-rc.2 → 5.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -0
- package/CLAUDE.md +31 -2
- package/lib/{wai-aria-deprecated-role → aria-prop-requires-role}/index.d.ts +0 -1
- package/lib/{wai-aria-no-global-prop → aria-prop-requires-role}/index.js +0 -1
- package/lib/attr-check.d.ts +0 -48
- package/lib/attr-check.js +0 -36
- package/lib/attr-eligibility.d.ts +41 -0
- package/lib/attr-eligibility.js +60 -0
- package/lib/attr-value-quotes/index.d.ts +0 -7
- package/lib/attr-value-quotes/index.js +0 -7
- package/lib/attr-value-quotes/meta.d.ts +0 -1
- package/lib/attr-value-quotes/meta.js +0 -1
- package/lib/case-sensitive-attr-name/index.d.ts +0 -8
- package/lib/case-sensitive-attr-name/index.js +0 -8
- package/lib/case-sensitive-attr-name/meta.d.ts +0 -1
- package/lib/case-sensitive-attr-name/meta.js +0 -1
- package/lib/case-sensitive-tag-name/index.d.ts +0 -8
- package/lib/case-sensitive-tag-name/index.js +0 -8
- package/lib/case-sensitive-tag-name/meta.d.ts +0 -1
- package/lib/case-sensitive-tag-name/meta.js +0 -1
- package/lib/class-naming/index.d.ts +0 -8
- package/lib/class-naming/index.js +0 -8
- package/lib/class-naming/meta.d.ts +1 -2
- package/lib/class-naming/meta.js +1 -2
- package/lib/consistent-table-row-length/index.d.ts +14 -0
- package/lib/consistent-table-row-length/index.js +69 -0
- package/lib/consistent-table-row-length/meta.d.ts +4 -0
- package/lib/consistent-table-row-length/meta.js +3 -0
- package/lib/create-message.d.ts +2 -25
- package/lib/create-message.js +2 -53
- package/lib/debug.d.ts +1 -9
- package/lib/debug.js +1 -5
- package/lib/element-supports-aria-prop/index.d.ts +12 -0
- package/lib/element-supports-aria-prop/index.js +38 -0
- package/lib/form-attr-references-form/index.d.ts +12 -0
- package/lib/form-attr-references-form/index.js +64 -0
- package/lib/{correct-aspect-ratio → form-attr-references-form}/meta.d.ts +1 -1
- package/lib/form-attr-references-form/meta.js +3 -0
- package/lib/head-element-order/meta.d.ts +1 -1
- package/lib/head-element-order/meta.js +1 -1
- package/lib/helpers.d.ts +8 -138
- package/lib/helpers.js +24 -165
- package/lib/index.d.ts +135 -78
- package/lib/index.js +167 -82
- package/lib/input-list-references-datalist/index.d.ts +13 -0
- package/lib/input-list-references-datalist/index.js +46 -0
- package/lib/input-list-references-datalist/meta.d.ts +4 -0
- package/lib/input-list-references-datalist/meta.js +3 -0
- package/lib/itemprop-requires-itemscope/index.d.ts +21 -0
- package/lib/itemprop-requires-itemscope/index.js +53 -0
- package/lib/itemprop-requires-itemscope/meta.d.ts +4 -0
- package/lib/itemprop-requires-itemscope/meta.js +3 -0
- package/lib/label-for-references-labelable/index.d.ts +12 -0
- package/lib/label-for-references-labelable/index.js +68 -0
- package/lib/label-for-references-labelable/meta.d.ts +4 -0
- package/lib/label-for-references-labelable/meta.js +3 -0
- package/lib/label-has-control/index.d.ts +5 -5
- package/lib/label-has-control/index.js +5 -18
- package/lib/label-has-control/meta.d.ts +0 -1
- package/lib/label-has-control/meta.js +0 -1
- package/lib/label-no-multiple-controls/index.d.ts +31 -0
- package/lib/label-no-multiple-controls/index.js +104 -0
- package/lib/label-no-multiple-controls/meta.d.ts +4 -0
- package/lib/label-no-multiple-controls/meta.js +3 -0
- package/lib/landmark-roles/roles.d.ts +32 -0
- package/lib/landmark-roles/roles.js +73 -0
- package/lib/link-types/index.d.ts +0 -5
- package/lib/link-types/index.js +5 -6
- package/lib/link-types/meta.d.ts +1 -2
- package/lib/link-types/meta.js +1 -2
- package/lib/map-id-name-match/index.d.ts +10 -0
- package/lib/map-id-name-match/index.js +39 -0
- package/lib/map-id-name-match/meta.d.ts +4 -0
- package/lib/map-id-name-match/meta.js +3 -0
- package/lib/meta-charset-position/index.d.ts +15 -0
- package/lib/meta-charset-position/index.js +31 -0
- package/lib/meta-charset-position/meta.d.ts +4 -0
- package/lib/meta-charset-position/meta.js +3 -0
- package/lib/meter-value-bounds/index.d.ts +10 -0
- package/lib/meter-value-bounds/index.js +123 -0
- package/lib/meter-value-bounds/meta.d.ts +4 -0
- package/lib/meter-value-bounds/meta.js +3 -0
- package/lib/{wai-aria-required-props → no-abstract-role}/index.d.ts +0 -1
- package/lib/{wai-aria-abstract-role → no-abstract-role}/index.js +0 -1
- package/lib/no-always-matching-source/index.d.ts +13 -0
- package/lib/no-always-matching-source/index.js +100 -0
- package/lib/no-always-matching-source/meta.d.ts +4 -0
- package/lib/no-always-matching-source/meta.js +3 -0
- package/lib/no-ambiguous-navigable-target-names/index.d.ts +0 -8
- package/lib/no-ambiguous-navigable-target-names/index.js +0 -8
- package/lib/no-ambiguous-navigable-target-names/meta.d.ts +1 -2
- package/lib/no-ambiguous-navigable-target-names/meta.js +1 -2
- package/lib/{wai-aria-required-owned-elements → no-aria-on-presentational-children}/index.d.ts +0 -1
- package/lib/{wai-aria-presentational-children → no-aria-on-presentational-children}/index.js +0 -1
- package/lib/no-aria-on-unsupported-element/index.d.ts +11 -0
- package/lib/no-aria-on-unsupported-element/index.js +35 -0
- package/lib/no-aria-on-unsupported-element/meta.d.ts +9 -0
- package/lib/no-aria-on-unsupported-element/meta.js +8 -0
- package/lib/no-boolean-attr-value/index.d.ts +0 -7
- package/lib/no-boolean-attr-value/index.js +0 -7
- package/lib/no-boolean-attr-value/meta.d.ts +0 -1
- package/lib/no-boolean-attr-value/meta.js +0 -1
- package/lib/no-broken-fragment-link/index.d.ts +15 -0
- package/lib/no-broken-fragment-link/index.js +93 -0
- package/lib/no-broken-fragment-link/meta.d.ts +4 -0
- package/lib/no-broken-fragment-link/meta.js +3 -0
- package/lib/no-consecutive-br/index.d.ts +0 -8
- package/lib/no-consecutive-br/index.js +0 -8
- package/lib/no-consecutive-br/meta.d.ts +0 -1
- package/lib/no-consecutive-br/meta.js +0 -1
- package/lib/no-content-after-body/index.d.ts +25 -0
- package/lib/no-content-after-body/index.js +51 -0
- package/lib/no-content-after-body/meta.d.ts +4 -0
- package/lib/no-content-after-body/meta.js +3 -0
- package/lib/no-contradictory-aria-prop/index.d.ts +10 -0
- package/lib/no-contradictory-aria-prop/index.js +34 -0
- package/lib/{wai-aria-abstract-role → no-default-aria-value}/index.d.ts +0 -1
- package/lib/{wai-aria-default-value → no-default-aria-value}/index.js +0 -1
- package/lib/no-default-value/index.d.ts +0 -7
- package/lib/no-default-value/index.js +0 -7
- package/lib/no-default-value/meta.d.ts +0 -1
- package/lib/no-default-value/meta.js +0 -1
- package/lib/no-deprecated-aria-prop/index.d.ts +3 -0
- package/lib/{wai-aria-deprecated-props → no-deprecated-aria-prop}/index.js +0 -1
- package/lib/no-deprecated-attr/index.d.ts +2 -0
- package/lib/{deprecated-attr → no-deprecated-attr}/index.js +5 -9
- package/lib/no-deprecated-attr/meta.d.ts +4 -0
- package/lib/no-deprecated-attr/meta.js +3 -0
- package/lib/no-deprecated-element/index.d.ts +2 -0
- package/lib/no-deprecated-element/index.js +27 -0
- package/lib/no-deprecated-element/meta.d.ts +4 -0
- package/lib/no-deprecated-element/meta.js +3 -0
- package/lib/no-deprecated-role/index.d.ts +3 -0
- package/lib/{wai-aria-deprecated-role → no-deprecated-role}/index.js +0 -1
- package/lib/no-disallowed-ancestor/index.d.ts +2 -0
- package/lib/no-disallowed-ancestor/index.js +25 -0
- package/lib/no-disallowed-ancestor/meta.d.ts +4 -0
- package/lib/no-disallowed-ancestor/meta.js +3 -0
- package/lib/no-disallowed-attr/index.d.ts +28 -0
- package/lib/no-disallowed-attr/index.js +77 -0
- package/lib/no-disallowed-attr/meta.d.ts +4 -0
- package/lib/no-disallowed-attr/meta.js +3 -0
- package/lib/no-duplicate-attr/index.d.ts +2 -0
- package/lib/{attr-duplication → no-duplicate-attr}/index.js +0 -7
- package/lib/no-duplicate-attr/meta.d.ts +6 -0
- package/lib/no-duplicate-attr/meta.js +10 -0
- package/lib/no-duplicate-autofocus/index.d.ts +0 -5
- package/lib/no-duplicate-autofocus/index.js +20 -6
- package/lib/no-duplicate-autofocus/meta.d.ts +1 -1
- package/lib/no-duplicate-autofocus/meta.js +1 -1
- package/lib/no-duplicate-dt/index.d.ts +0 -6
- package/lib/no-duplicate-dt/index.js +1 -6
- package/lib/no-duplicate-dt/meta.d.ts +1 -2
- package/lib/no-duplicate-dt/meta.js +1 -2
- package/lib/no-duplicate-h1/index.d.ts +18 -0
- package/lib/no-duplicate-h1/index.js +41 -0
- package/lib/no-duplicate-h1/meta.d.ts +4 -0
- package/lib/no-duplicate-h1/meta.js +3 -0
- package/lib/no-duplicate-id/index.d.ts +2 -0
- package/lib/{id-duplication → no-duplicate-id}/index.js +0 -7
- package/lib/no-duplicate-id/meta.d.ts +4 -0
- package/lib/no-duplicate-id/meta.js +3 -0
- package/lib/no-duplicate-sibling-attr/index.d.ts +2 -0
- package/lib/no-duplicate-sibling-attr/index.js +35 -0
- package/lib/no-duplicate-sibling-attr/meta.d.ts +4 -0
- package/lib/no-duplicate-sibling-attr/meta.js +3 -0
- package/lib/no-duplicate-visible-main/index.d.ts +0 -1
- package/lib/no-duplicate-visible-main/index.js +0 -1
- package/lib/no-duplicate-visible-main/meta.d.ts +1 -1
- package/lib/no-duplicate-visible-main/meta.js +1 -1
- package/lib/no-empty-palpable-content/index.d.ts +0 -8
- package/lib/no-empty-palpable-content/index.js +0 -8
- package/lib/no-empty-palpable-content/meta.d.ts +1 -2
- package/lib/no-empty-palpable-content/meta.js +1 -2
- package/lib/no-empty-table-track/index.d.ts +12 -0
- package/lib/no-empty-table-track/index.js +42 -0
- package/lib/no-empty-table-track/meta.d.ts +4 -0
- package/lib/no-empty-table-track/meta.js +3 -0
- package/lib/no-event-handler-attr/index.d.ts +7 -0
- package/lib/{no-use-event-handler-attr → no-event-handler-attr}/index.js +0 -11
- package/lib/no-event-handler-attr/meta.d.ts +4 -0
- package/lib/no-event-handler-attr/meta.js +3 -0
- package/lib/no-experimental-features/index.d.ts +9 -0
- package/lib/no-experimental-features/index.js +53 -0
- package/lib/no-experimental-features/meta.d.ts +4 -0
- package/lib/no-experimental-features/meta.js +3 -0
- package/lib/no-extra-selected-options/index.d.ts +10 -0
- package/lib/no-extra-selected-options/index.js +37 -0
- package/lib/no-extra-selected-options/meta.d.ts +4 -0
- package/lib/no-extra-selected-options/meta.js +3 -0
- package/lib/no-focusable-in-aria-hidden/index.d.ts +3 -0
- package/lib/{wai-aria-interaction-in-hidden → no-focusable-in-aria-hidden}/index.js +0 -1
- package/lib/no-focusable-in-aria-hidden/meta.d.ts +4 -0
- package/lib/no-focusable-in-aria-hidden/meta.js +3 -0
- package/lib/no-hardcoded-id/index.d.ts +2 -0
- package/lib/{no-hard-code-id → no-hardcoded-id}/index.js +0 -8
- package/lib/no-hardcoded-id/meta.d.ts +4 -0
- package/lib/no-hardcoded-id/meta.js +3 -0
- package/lib/no-ineffective-attr/index.d.ts +2 -0
- package/lib/{ineffective-attr → no-ineffective-attr}/index.js +0 -7
- package/lib/no-ineffective-attr/meta.d.ts +5 -0
- package/lib/no-ineffective-attr/meta.js +4 -0
- package/lib/no-input-file-value/index.d.ts +10 -0
- package/lib/no-input-file-value/index.js +41 -0
- package/lib/no-input-file-value/meta.d.ts +4 -0
- package/lib/no-input-file-value/meta.js +3 -0
- package/lib/no-invalid-aria-prop-value/index.d.ts +3 -0
- package/lib/{wai-aria-value → no-invalid-aria-prop-value}/index.js +0 -1
- package/lib/no-invalid-aria-prop-value/meta.d.ts +4 -0
- package/lib/no-invalid-aria-prop-value/meta.js +3 -0
- package/lib/no-invalid-attr-value/index.d.ts +27 -0
- package/lib/no-invalid-attr-value/index.js +83 -0
- package/lib/no-invalid-attr-value/meta.d.ts +4 -0
- package/lib/no-invalid-attr-value/meta.js +3 -0
- package/lib/no-malformed-character-reference/index.d.ts +2 -0
- package/lib/no-malformed-character-reference/index.js +38 -0
- package/lib/no-malformed-character-reference/meta.d.ts +5 -0
- package/lib/no-malformed-character-reference/meta.js +20 -0
- package/lib/{correct-aspect-ratio → no-mismatched-aspect-ratio}/index.js +13 -3
- package/lib/no-mismatched-aspect-ratio/meta.d.ts +4 -0
- package/lib/no-mismatched-aspect-ratio/meta.js +3 -0
- package/lib/{correct-aspect-ratio → no-mismatched-aspect-ratio}/resolve-image-size.js +8 -2
- package/lib/no-mixed-srcset-descriptors/index.d.ts +12 -0
- package/lib/no-mixed-srcset-descriptors/index.js +47 -0
- package/lib/no-mixed-srcset-descriptors/meta.d.ts +4 -0
- package/lib/no-mixed-srcset-descriptors/meta.js +3 -0
- package/lib/no-nested-top-level-landmark/index.d.ts +10 -0
- package/lib/no-nested-top-level-landmark/index.js +52 -0
- package/lib/no-nested-top-level-landmark/meta.d.ts +4 -0
- package/lib/no-nested-top-level-landmark/meta.js +3 -0
- package/lib/no-nonstandard-features/index.d.ts +9 -0
- package/lib/no-nonstandard-features/index.js +53 -0
- package/lib/no-nonstandard-features/meta.d.ts +4 -0
- package/lib/no-nonstandard-features/meta.js +3 -0
- package/lib/no-obsolete-attr/index.d.ts +2 -0
- package/lib/no-obsolete-attr/index.js +27 -0
- package/lib/no-obsolete-attr/meta.d.ts +4 -0
- package/lib/no-obsolete-attr/meta.js +3 -0
- package/lib/no-obsolete-doctype/index.d.ts +2 -0
- package/lib/{doctype → no-obsolete-doctype}/index.js +9 -16
- package/lib/no-obsolete-doctype/meta.d.ts +4 -0
- package/lib/no-obsolete-doctype/meta.js +3 -0
- package/lib/no-obsolete-element/index.d.ts +2 -0
- package/lib/{deprecated-element → no-obsolete-element}/index.js +6 -10
- package/lib/no-obsolete-element/meta.d.ts +4 -0
- package/lib/no-obsolete-element/meta.js +3 -0
- package/lib/no-orphaned-end-tag/index.d.ts +0 -7
- package/lib/no-orphaned-end-tag/index.js +0 -7
- package/lib/no-orphaned-end-tag/meta.d.ts +2 -2
- package/lib/no-orphaned-end-tag/meta.js +5 -2
- package/lib/no-prohibited-naming/index.d.ts +8 -0
- package/lib/no-prohibited-naming/index.js +36 -0
- package/lib/no-prohibited-naming/meta.d.ts +4 -0
- package/lib/no-prohibited-naming/meta.js +3 -0
- package/lib/{use-list → no-pseudo-list}/index.d.ts +1 -8
- package/lib/{use-list → no-pseudo-list}/index.js +0 -7
- package/lib/no-pseudo-list/meta.d.ts +4 -0
- package/lib/no-pseudo-list/meta.js +3 -0
- package/lib/{redundant-accessible-name → no-redundant-accessible-name}/index.d.ts +0 -4
- package/lib/{redundant-accessible-name → no-redundant-accessible-name}/index.js +0 -4
- package/lib/no-redundant-accessible-name/meta.d.ts +4 -0
- package/lib/no-redundant-accessible-name/meta.js +3 -0
- package/lib/no-redundant-aria-prop/index.d.ts +10 -0
- package/lib/{wai-aria-implicit-props → no-redundant-aria-prop}/index.js +9 -3
- package/lib/no-redundant-aria-prop/meta.d.ts +4 -0
- package/lib/no-redundant-aria-prop/meta.js +3 -0
- package/lib/no-redundant-role/index.d.ts +3 -0
- package/lib/{wai-aria-implicit-role → no-redundant-role}/index.js +0 -1
- package/lib/no-redundant-role/meta.d.ts +4 -0
- package/lib/no-redundant-role/meta.js +3 -0
- package/lib/no-refer-to-non-existent-id/index.d.ts +0 -9
- package/lib/no-refer-to-non-existent-id/index.js +1 -62
- package/lib/no-refer-to-non-existent-id/meta.d.ts +1 -2
- package/lib/no-refer-to-non-existent-id/meta.js +1 -2
- package/lib/no-restricted-attr/index.d.ts +27 -0
- package/lib/no-restricted-attr/index.js +96 -0
- package/lib/no-restricted-attr/meta.d.ts +4 -0
- package/lib/no-restricted-attr/meta.js +3 -0
- package/lib/no-restricted-element/index.d.ts +2 -0
- package/lib/{disallowed-element → no-restricted-element}/index.js +7 -8
- package/lib/no-restricted-element/meta.d.ts +4 -0
- package/lib/no-restricted-element/meta.js +3 -0
- package/lib/no-skipped-heading-level/index.d.ts +13 -0
- package/lib/{heading-levels → no-skipped-heading-level}/index.js +10 -5
- package/lib/no-skipped-heading-level/meta.d.ts +4 -0
- package/lib/no-skipped-heading-level/meta.js +3 -0
- package/lib/no-stray-head-or-body-tag/index.d.ts +28 -0
- package/lib/no-stray-head-or-body-tag/index.js +61 -0
- package/lib/no-stray-head-or-body-tag/meta.d.ts +4 -0
- package/lib/no-stray-head-or-body-tag/meta.js +3 -0
- package/lib/no-table-cell-overlap/index.d.ts +12 -0
- package/lib/no-table-cell-overlap/index.js +30 -0
- package/lib/no-table-cell-overlap/meta.d.ts +4 -0
- package/lib/no-table-cell-overlap/meta.js +3 -0
- package/lib/no-table-span-overflow/index.d.ts +12 -0
- package/lib/no-table-span-overflow/index.js +37 -0
- package/lib/no-table-span-overflow/meta.d.ts +4 -0
- package/lib/no-table-span-overflow/meta.js +3 -0
- package/lib/no-unclosed-element-at-eof/index.d.ts +2 -0
- package/lib/no-unclosed-element-at-eof/index.js +86 -0
- package/lib/no-unclosed-element-at-eof/meta.d.ts +4 -0
- package/lib/no-unclosed-element-at-eof/meta.js +3 -0
- package/lib/no-unescaped-char/index.d.ts +14 -0
- package/lib/{character-reference → no-unescaped-char}/index.js +31 -20
- package/lib/no-unescaped-char/meta.d.ts +4 -0
- package/lib/no-unescaped-char/meta.js +3 -0
- package/lib/{invalid-attr → no-unknown-attr}/index.d.ts +4 -19
- package/lib/no-unknown-attr/index.js +91 -0
- package/lib/no-unknown-attr/meta.d.ts +4 -0
- package/lib/no-unknown-attr/meta.js +3 -0
- package/lib/no-unknown-role/index.d.ts +3 -0
- package/lib/{wai-aria-non-existent-role → no-unknown-role}/index.js +0 -1
- package/lib/no-unknown-role/meta.d.ts +4 -0
- package/lib/no-unknown-role/meta.js +3 -0
- package/lib/no-unpaired-srcset-sizes/index.d.ts +12 -0
- package/lib/no-unpaired-srcset-sizes/index.js +77 -0
- package/lib/no-unpaired-srcset-sizes/meta.d.ts +4 -0
- package/lib/no-unpaired-srcset-sizes/meta.js +3 -0
- package/lib/{no-unsupported-features → no-unsupported-browser-features}/index.d.ts +1 -10
- package/lib/no-unsupported-browser-features/index.js +81 -0
- package/lib/no-unsupported-browser-features/meta.d.ts +4 -0
- package/lib/no-unsupported-browser-features/meta.js +3 -0
- package/lib/permitted-contents/index.d.ts +0 -18
- package/lib/permitted-contents/index.js +0 -78
- package/lib/permitted-contents/meta.d.ts +1 -2
- package/lib/permitted-contents/meta.js +1 -2
- package/lib/permitted-contents/represent-transparent-nodes.js +15 -6
- package/lib/permitted-roles/index.d.ts +3 -0
- package/lib/{wai-aria-permitted-roles → permitted-roles}/index.js +0 -1
- package/lib/permitted-roles/meta.d.ts +4 -0
- package/lib/permitted-roles/meta.js +3 -0
- package/lib/placeholder-label-option/index.d.ts +10 -4
- package/lib/placeholder-label-option/index.js +30 -17
- package/lib/placeholder-label-option/meta.d.ts +1 -2
- package/lib/placeholder-label-option/meta.js +1 -2
- package/lib/progress-value-bounds/index.d.ts +10 -0
- package/lib/progress-value-bounds/index.js +59 -0
- package/lib/progress-value-bounds/meta.d.ts +4 -0
- package/lib/progress-value-bounds/meta.js +3 -0
- package/lib/require-accessible-name/index.d.ts +0 -7
- package/lib/require-accessible-name/index.js +0 -7
- package/lib/require-accessible-name/meta.d.ts +0 -1
- package/lib/require-accessible-name/meta.js +0 -1
- package/lib/require-adjacent-popover/index.d.ts +2 -0
- package/lib/{neighbor-popovers → require-adjacent-popover}/index.js +1 -8
- package/lib/require-adjacent-popover/meta.d.ts +4 -0
- package/lib/require-adjacent-popover/meta.js +3 -0
- package/lib/require-ancestor/index.d.ts +2 -0
- package/lib/require-ancestor/index.js +29 -0
- package/lib/require-ancestor/meta.d.ts +4 -0
- package/lib/require-ancestor/meta.js +3 -0
- package/lib/require-aria-prop/index.d.ts +3 -0
- package/lib/{wai-aria-required-props → require-aria-prop}/index.js +0 -1
- package/lib/require-aria-prop/meta.d.ts +4 -0
- package/lib/require-aria-prop/meta.js +3 -0
- package/lib/{required-attr → require-attr}/index.d.ts +2 -9
- package/lib/{required-attr → require-attr}/index.js +0 -7
- package/lib/require-attr/meta.d.ts +4 -0
- package/lib/require-attr/meta.js +3 -0
- package/lib/require-datetime/index.d.ts +0 -8
- package/lib/require-datetime/index.js +0 -8
- package/lib/require-datetime/meta.d.ts +1 -2
- package/lib/require-datetime/meta.js +1 -2
- package/lib/require-dialog-autofocus/index.d.ts +0 -10
- package/lib/require-dialog-autofocus/index.js +0 -10
- package/lib/require-dialog-autofocus/meta.d.ts +0 -1
- package/lib/require-dialog-autofocus/meta.js +0 -1
- package/lib/require-doctype/index.d.ts +2 -0
- package/lib/require-doctype/index.js +19 -0
- package/lib/require-doctype/meta.d.ts +5 -0
- package/lib/require-doctype/meta.js +10 -0
- package/lib/{required-element → require-element}/index.d.ts +1 -9
- package/lib/{required-element → require-element}/index.js +0 -8
- package/lib/require-element/meta.d.ts +4 -0
- package/lib/require-element/meta.js +3 -0
- package/lib/require-end-tag/index.d.ts +2 -0
- package/lib/{end-tag → require-end-tag}/index.js +0 -7
- package/lib/require-end-tag/meta.d.ts +4 -0
- package/lib/require-end-tag/meta.js +3 -0
- package/lib/require-h1/index.d.ts +17 -0
- package/lib/{required-h1 → require-h1}/index.js +6 -14
- package/lib/require-h1/meta.d.ts +4 -0
- package/lib/require-h1/meta.js +3 -0
- package/lib/require-landmark-label/index.d.ts +11 -0
- package/lib/require-landmark-label/index.js +55 -0
- package/lib/require-landmark-label/meta.d.ts +4 -0
- package/lib/require-landmark-label/meta.js +3 -0
- package/lib/require-owned-elements/index.d.ts +3 -0
- package/lib/{wai-aria-required-owned-elements → require-owned-elements}/index.js +0 -2
- package/lib/require-owned-elements/meta.d.ts +4 -0
- package/lib/require-owned-elements/meta.js +3 -0
- package/lib/require-parent-role/index.d.ts +3 -0
- package/lib/{wai-aria-required-parent-role → require-parent-role}/index.js +0 -1
- package/lib/require-parent-role/meta.d.ts +4 -0
- package/lib/require-parent-role/meta.js +3 -0
- package/lib/role-supports-aria-prop/index.d.ts +8 -0
- package/lib/{wai-aria-disallowed-props → role-supports-aria-prop}/index.js +11 -10
- package/lib/role-supports-aria-prop/meta.d.ts +4 -0
- package/lib/role-supports-aria-prop/meta.js +3 -0
- package/lib/rule-aliases.d.ts +2 -0
- package/lib/rule-aliases.js +325 -0
- package/lib/sizes-auto-requires-lazy-loading/index.d.ts +14 -0
- package/lib/sizes-auto-requires-lazy-loading/index.js +68 -0
- package/lib/sizes-auto-requires-lazy-loading/meta.d.ts +4 -0
- package/lib/sizes-auto-requires-lazy-loading/meta.js +3 -0
- package/lib/srcset-sizes-constraint/parse-srcset.d.ts +6 -0
- package/lib/srcset-sizes-constraint/parse-srcset.js +6 -0
- package/lib/srcset-sizes-constraint/sibling-helpers.d.ts +21 -0
- package/lib/srcset-sizes-constraint/sibling-helpers.js +37 -0
- package/lib/tab-requires-tabpanel/index.d.ts +3 -0
- package/lib/tab-requires-tabpanel/index.js +21 -0
- package/lib/tab-requires-tabpanel/meta.d.ts +4 -0
- package/lib/tab-requires-tabpanel/meta.js +3 -0
- package/lib/table-row-column-alignment/grid.d.ts +108 -52
- package/lib/table-row-column-alignment/grid.js +276 -203
- package/lib/table-row-column-alignment/types.d.ts +6 -8
- package/lib/usemap-references-map/index.d.ts +14 -0
- package/lib/usemap-references-map/index.js +46 -0
- package/lib/usemap-references-map/meta.d.ts +4 -0
- package/lib/usemap-references-map/meta.js +3 -0
- package/lib/valid-importmap/index.d.ts +2 -0
- package/lib/valid-importmap/index.js +176 -0
- package/lib/valid-importmap/meta.d.ts +4 -0
- package/lib/valid-importmap/meta.js +3 -0
- package/lib/valid-speculation-rules/index.d.ts +2 -0
- package/lib/valid-speculation-rules/index.js +292 -0
- package/lib/valid-speculation-rules/meta.d.ts +4 -0
- package/lib/valid-speculation-rules/meta.js +3 -0
- package/lib/wai-aria/checkings/contradictory-aria-prop.d.ts +23 -0
- package/lib/wai-aria/checkings/{implicit-props.js → contradictory-aria-prop.js} +22 -14
- package/lib/wai-aria/checkings/element-supports-aria-prop.d.ts +20 -0
- package/lib/wai-aria/checkings/element-supports-aria-prop.js +83 -0
- package/lib/wai-aria/checkings/prohibited-naming.d.ts +35 -0
- package/lib/wai-aria/checkings/prohibited-naming.js +64 -0
- package/lib/wai-aria/checkings/redundant-aria-prop.d.ts +23 -0
- package/lib/wai-aria/checkings/redundant-aria-prop.js +53 -0
- package/lib/wai-aria/checkings/required-prop.d.ts +4 -0
- package/lib/wai-aria/checkings/required-prop.js +16 -3
- package/lib/wai-aria/checkings/role-supports-aria-prop.d.ts +20 -0
- package/lib/wai-aria/checkings/role-supports-aria-prop.js +30 -0
- package/lib/wai-aria/checkings/tab-requires-tabpanel.d.ts +19 -0
- package/lib/wai-aria/checkings/tab-requires-tabpanel.js +56 -0
- package/lib/wai-aria/default-options.js +1 -0
- package/lib/wai-aria/types.d.ts +2 -0
- package/package.json +11 -10
- package/schema.json +275 -59
- package/SKILL.md +0 -77
- package/lib/attr-duplication/index.d.ts +0 -9
- package/lib/attr-duplication/meta.d.ts +0 -6
- package/lib/attr-duplication/meta.js +0 -5
- package/lib/character-reference/index.d.ts +0 -12
- package/lib/character-reference/meta.d.ts +0 -5
- package/lib/character-reference/meta.js +0 -4
- package/lib/correct-aspect-ratio/meta.js +0 -3
- package/lib/deprecated-attr/index.d.ts +0 -8
- package/lib/deprecated-attr/meta.d.ts +0 -5
- package/lib/deprecated-attr/meta.js +0 -4
- package/lib/deprecated-element/index.d.ts +0 -8
- package/lib/deprecated-element/meta.d.ts +0 -5
- package/lib/deprecated-element/meta.js +0 -4
- package/lib/disallowed-element/index.d.ts +0 -9
- package/lib/disallowed-element/meta.d.ts +0 -5
- package/lib/disallowed-element/meta.js +0 -4
- package/lib/doctype/index.d.ts +0 -15
- package/lib/doctype/meta.d.ts +0 -5
- package/lib/doctype/meta.js +0 -4
- package/lib/end-tag/index.d.ts +0 -9
- package/lib/end-tag/meta.d.ts +0 -5
- package/lib/end-tag/meta.js +0 -4
- package/lib/heading-levels/index.d.ts +0 -8
- package/lib/heading-levels/meta.d.ts +0 -5
- package/lib/heading-levels/meta.js +0 -4
- package/lib/id-duplication/index.d.ts +0 -9
- package/lib/id-duplication/meta.d.ts +0 -5
- package/lib/id-duplication/meta.js +0 -4
- package/lib/ineffective-attr/index.d.ts +0 -9
- package/lib/ineffective-attr/meta.d.ts +0 -6
- package/lib/ineffective-attr/meta.js +0 -5
- package/lib/invalid-attr/index.js +0 -207
- package/lib/invalid-attr/meta.d.ts +0 -5
- package/lib/invalid-attr/meta.js +0 -4
- package/lib/landmark-roles/index.d.ts +0 -22
- package/lib/landmark-roles/index.js +0 -142
- package/lib/landmark-roles/meta.d.ts +0 -5
- package/lib/landmark-roles/meta.js +0 -4
- package/lib/neighbor-popovers/index.d.ts +0 -10
- package/lib/neighbor-popovers/meta.d.ts +0 -5
- package/lib/neighbor-popovers/meta.js +0 -4
- package/lib/no-hard-code-id/index.d.ts +0 -10
- package/lib/no-hard-code-id/meta.d.ts +0 -5
- package/lib/no-hard-code-id/meta.js +0 -4
- package/lib/no-unsupported-features/index.js +0 -139
- package/lib/no-unsupported-features/meta.d.ts +0 -5
- package/lib/no-unsupported-features/meta.js +0 -4
- package/lib/no-use-event-handler-attr/index.d.ts +0 -18
- package/lib/no-use-event-handler-attr/meta.d.ts +0 -5
- package/lib/no-use-event-handler-attr/meta.js +0 -4
- package/lib/redundant-accessible-name/meta.d.ts +0 -5
- package/lib/redundant-accessible-name/meta.js +0 -4
- package/lib/required-attr/meta.d.ts +0 -5
- package/lib/required-attr/meta.js +0 -4
- package/lib/required-element/meta.d.ts +0 -5
- package/lib/required-element/meta.js +0 -4
- package/lib/required-h1/index.d.ts +0 -18
- package/lib/required-h1/meta.d.ts +0 -5
- package/lib/required-h1/meta.js +0 -4
- package/lib/srcset-sizes-constraint/index.d.ts +0 -6
- package/lib/srcset-sizes-constraint/index.js +0 -108
- package/lib/srcset-sizes-constraint/meta.d.ts +0 -5
- package/lib/srcset-sizes-constraint/meta.js +0 -4
- package/lib/table-row-column-alignment/index.d.ts +0 -10
- package/lib/table-row-column-alignment/index.js +0 -97
- package/lib/table-row-column-alignment/meta.d.ts +0 -5
- package/lib/table-row-column-alignment/meta.js +0 -4
- package/lib/use-list/meta.d.ts +0 -5
- package/lib/use-list/meta.js +0 -4
- package/lib/wai-aria/checkings/disallowed-prop.d.ts +0 -23
- package/lib/wai-aria/checkings/disallowed-prop.js +0 -84
- package/lib/wai-aria/checkings/implicit-props.d.ts +0 -20
- package/lib/wai-aria/index.d.ts +0 -13
- package/lib/wai-aria/index.js +0 -115
- package/lib/wai-aria/meta.d.ts +0 -5
- package/lib/wai-aria/meta.js +0 -4
- package/lib/wai-aria-default-value/index.d.ts +0 -4
- package/lib/wai-aria-default-value/meta.d.ts +0 -5
- package/lib/wai-aria-default-value/meta.js +0 -4
- package/lib/wai-aria-deprecated-props/index.d.ts +0 -4
- package/lib/wai-aria-deprecated-props/meta.d.ts +0 -5
- package/lib/wai-aria-deprecated-props/meta.js +0 -4
- package/lib/wai-aria-disallowed-props/index.d.ts +0 -4
- package/lib/wai-aria-disallowed-props/meta.d.ts +0 -5
- package/lib/wai-aria-disallowed-props/meta.js +0 -4
- package/lib/wai-aria-implicit-props/index.d.ts +0 -4
- package/lib/wai-aria-implicit-props/meta.d.ts +0 -5
- package/lib/wai-aria-implicit-props/meta.js +0 -4
- package/lib/wai-aria-implicit-role/index.d.ts +0 -4
- package/lib/wai-aria-interaction-in-hidden/index.d.ts +0 -4
- package/lib/wai-aria-interaction-in-hidden/meta.d.ts +0 -5
- package/lib/wai-aria-interaction-in-hidden/meta.js +0 -4
- package/lib/wai-aria-no-global-prop/index.d.ts +0 -4
- package/lib/wai-aria-no-global-prop/meta.d.ts +0 -5
- package/lib/wai-aria-no-global-prop/meta.js +0 -4
- package/lib/wai-aria-non-existent-role/index.d.ts +0 -4
- package/lib/wai-aria-permitted-roles/index.d.ts +0 -4
- package/lib/wai-aria-presentational-children/index.d.ts +0 -4
- package/lib/wai-aria-presentational-children/meta.d.ts +0 -5
- package/lib/wai-aria-presentational-children/meta.js +0 -4
- package/lib/wai-aria-required-parent-role/index.d.ts +0 -4
- package/lib/wai-aria-value/index.d.ts +0 -4
- package/lib/wai-aria-value/meta.d.ts +0 -5
- package/lib/wai-aria-value/meta.js +0 -4
- /package/lib/{wai-aria-abstract-role → aria-prop-requires-role}/meta.d.ts +0 -0
- /package/lib/{wai-aria-abstract-role → aria-prop-requires-role}/meta.js +0 -0
- /package/lib/{wai-aria-deprecated-role → element-supports-aria-prop}/meta.d.ts +0 -0
- /package/lib/{wai-aria-deprecated-role → element-supports-aria-prop}/meta.js +0 -0
- /package/lib/{wai-aria-implicit-role → no-abstract-role}/meta.d.ts +0 -0
- /package/lib/{wai-aria-implicit-role → no-abstract-role}/meta.js +0 -0
- /package/lib/{wai-aria-non-existent-role → no-aria-on-presentational-children}/meta.d.ts +0 -0
- /package/lib/{wai-aria-non-existent-role → no-aria-on-presentational-children}/meta.js +0 -0
- /package/lib/{wai-aria-permitted-roles → no-contradictory-aria-prop}/meta.d.ts +0 -0
- /package/lib/{wai-aria-permitted-roles → no-contradictory-aria-prop}/meta.js +0 -0
- /package/lib/{wai-aria-required-owned-elements → no-default-aria-value}/meta.d.ts +0 -0
- /package/lib/{wai-aria-required-owned-elements → no-default-aria-value}/meta.js +0 -0
- /package/lib/{wai-aria-required-parent-role → no-deprecated-aria-prop}/meta.d.ts +0 -0
- /package/lib/{wai-aria-required-parent-role → no-deprecated-aria-prop}/meta.js +0 -0
- /package/lib/{wai-aria-required-props → no-deprecated-role}/meta.d.ts +0 -0
- /package/lib/{wai-aria-required-props → no-deprecated-role}/meta.js +0 -0
- /package/lib/{correct-aspect-ratio → no-mismatched-aspect-ratio}/index.d.ts +0 -0
- /package/lib/{correct-aspect-ratio → no-mismatched-aspect-ratio}/resolve-image-size.d.ts +0 -0
- /package/lib/{no-unsupported-features → no-unsupported-browser-features}/compat-data.d.ts +0 -0
- /package/lib/{no-unsupported-features → no-unsupported-browser-features}/compat-data.js +0 -0
- /package/lib/{no-unsupported-features → no-unsupported-browser-features}/resolve-browsers.d.ts +0 -0
- /package/lib/{no-unsupported-features → no-unsupported-browser-features}/resolve-browsers.js +0 -0
package/lib/helpers.js
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import { attrCheck } from './attr-check.js';
|
|
3
|
-
/**
|
|
4
|
-
* Tests whether an element matches the condition specified in an attribute spec.
|
|
5
|
-
* When the condition is `null` or `undefined`, the element is considered to match unconditionally.
|
|
6
|
-
*
|
|
7
|
-
* @template T - The rule configuration value type
|
|
8
|
-
* @template O - The rule options type
|
|
9
|
-
* @param node - The element to test against the condition
|
|
10
|
-
* @param condition - A CSS selector string or array of selector strings from the attribute specification;
|
|
11
|
-
* if `null`/`undefined`, the function returns `true`
|
|
12
|
-
* @returns `true` if the element matches the condition (or no condition is given), `false` otherwise
|
|
13
|
-
*/
|
|
1
|
+
/** A `null`/`undefined` condition means the attribute applies unconditionally. */
|
|
14
2
|
export function attrMatches(
|
|
15
3
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
16
4
|
node, condition) {
|
|
17
5
|
if (condition == null) {
|
|
18
6
|
return true;
|
|
19
7
|
}
|
|
8
|
+
// Multiple condition selectors are OR-ed: joined with ',' as a selector list, any match enables the attribute.
|
|
20
9
|
const condSelector = typeof condition === 'string' ? condition : condition.join(',');
|
|
21
10
|
return node.matches(condSelector);
|
|
22
11
|
}
|
|
23
12
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @param needle - The string to test
|
|
29
|
-
* @param pattern - A plain string or a regex literal string (e.g. `/^foo/i`)
|
|
30
|
-
* @returns `true` if the needle matches the pattern
|
|
13
|
+
* Conditions are evaluated against literal attribute values, so when a referenced
|
|
14
|
+
* attribute's value is dynamic (template-interpolated) the condition result is
|
|
15
|
+
* indeterminate and must not be used to report a violation.
|
|
31
16
|
*/
|
|
17
|
+
export function conditionDependsOnDynamicAttr(
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
19
|
+
node, condition) {
|
|
20
|
+
const selectors = typeof condition === 'string' ? [condition] : condition;
|
|
21
|
+
const referencedNames = new Set();
|
|
22
|
+
for (const selector of selectors) {
|
|
23
|
+
// Collect attribute names from attribute selectors (e.g. `[type='module' i]` -> `type`)
|
|
24
|
+
for (const matched of selector.matchAll(/\[\s*([^\s\]=~|^$*]+)/g)) {
|
|
25
|
+
const name = matched[1];
|
|
26
|
+
if (name) {
|
|
27
|
+
referencedNames.add(name.toLowerCase());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return node.attributes.some(attr => attr.isDynamicValue && referencedNames.has(attr.localName.toLowerCase()));
|
|
32
|
+
}
|
|
33
|
+
/** `pattern` is a regex literal of the form `/pattern/flags` if it matches that shape, otherwise an exact string. */
|
|
32
34
|
export function match(needle, pattern) {
|
|
33
35
|
const matches = pattern.match(/^\/(.*)\/([gim])*$/);
|
|
34
36
|
if (matches && matches[1]) {
|
|
@@ -73,68 +75,6 @@ export const rePCENChar = [
|
|
|
73
75
|
'[\uFDF0-\uFFFD]',
|
|
74
76
|
'[\uD800-\uDBFF][\uDC00-\uDFFF]',
|
|
75
77
|
].join('|');
|
|
76
|
-
/**
|
|
77
|
-
* Validates an attribute name/value pair against its specification.
|
|
78
|
-
* Checks attribute existence in the spec, value validity, conditional applicability,
|
|
79
|
-
* and skips validation for dynamic (template-interpolated) values when the error
|
|
80
|
-
* relates to an invalid value.
|
|
81
|
-
*
|
|
82
|
-
* @param t - The i18n translator for generating localized error messages
|
|
83
|
-
* @param name - The attribute name to validate
|
|
84
|
-
* @param value - The attribute value to validate
|
|
85
|
-
* @param isDynamicValue - Whether the value is dynamic (e.g. from a template expression);
|
|
86
|
-
* if `true`, invalid-value errors are suppressed
|
|
87
|
-
* @param node - The element that owns the attribute
|
|
88
|
-
* @param attrSpecs - The list of attribute specifications to validate against
|
|
89
|
-
* @param log - Optional debug logger for diagnostic output
|
|
90
|
-
* @returns `false` if valid, or an `Invalid` object (or array of them) describing the violation
|
|
91
|
-
*/
|
|
92
|
-
export function isValidAttr(t, name, value, isDynamicValue,
|
|
93
|
-
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
94
|
-
node, attrSpecs,
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
96
|
-
log) {
|
|
97
|
-
let spec = attrSpecs.find(s => s.name.toLowerCase() === name.toLowerCase());
|
|
98
|
-
log?.('Spec of the %s attr: %o', name, spec);
|
|
99
|
-
// Resolve ConditionalAttributeType[] to a concrete type based on element matching (#3598).
|
|
100
|
-
if (spec && isConditionalAttributeTypeArray(spec.type)) {
|
|
101
|
-
const matched = spec.type.find(entry => {
|
|
102
|
-
const cond = typeof entry.condition === 'string' ? entry.condition : entry.condition.join(',');
|
|
103
|
-
return node.matches(cond);
|
|
104
|
-
});
|
|
105
|
-
log?.('ConditionalAttributeType resolution for %s: %o', name, matched);
|
|
106
|
-
// Fallback to 'Any' when no condition matches: input types without an explicit
|
|
107
|
-
// entry (text, search, tel, password, hidden, checkbox, radio, file, submit,
|
|
108
|
-
// image, reset, button) have no value constraints per the HTML spec.
|
|
109
|
-
spec = { ...spec, type: matched ? matched.type : 'Any' };
|
|
110
|
-
}
|
|
111
|
-
const allAttrNames = attrSpecs.map(s => s.name);
|
|
112
|
-
let invalid = attrCheck(t, name, value, false, spec, allAttrNames);
|
|
113
|
-
if (invalid === false &&
|
|
114
|
-
spec &&
|
|
115
|
-
spec.condition != null &&
|
|
116
|
-
!node.hasSpreadAttr &&
|
|
117
|
-
!attrMatches(node, spec.condition)) {
|
|
118
|
-
invalid = {
|
|
119
|
-
invalidType: 'non-existent',
|
|
120
|
-
message: t('{0} is {1}', t('the "{0*}" {1}', name, 'attribute'), 'disallowed'),
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
if (invalid !== false && (Array.isArray(invalid) || invalid.invalidType === 'invalid-value') && isDynamicValue) {
|
|
124
|
-
invalid = false;
|
|
125
|
-
}
|
|
126
|
-
return invalid;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Normalizes an attribute value according to its specification rules.
|
|
130
|
-
* Applies case-folding, whitespace trimming, and separator normalization
|
|
131
|
-
* based on the attribute type definition.
|
|
132
|
-
*
|
|
133
|
-
* @param value - The raw attribute value to normalize
|
|
134
|
-
* @param spec - The attribute specification that defines normalization rules
|
|
135
|
-
* (case sensitivity, separator type, whitespace handling)
|
|
136
|
-
* @returns The normalized attribute value
|
|
137
|
-
*/
|
|
138
78
|
export function toNormalizedValue(value, spec) {
|
|
139
79
|
let normalized = value;
|
|
140
80
|
if (!spec.caseSensitive) {
|
|
@@ -165,15 +105,6 @@ export function toNormalizedValue(value, spec) {
|
|
|
165
105
|
}
|
|
166
106
|
return normalized;
|
|
167
107
|
}
|
|
168
|
-
/**
|
|
169
|
-
* Determines whether an element's accessible name may change at runtime.
|
|
170
|
-
* Returns `true` if the element itself has mutable attributes or children,
|
|
171
|
-
* or if an associated `<label>` element has mutable content.
|
|
172
|
-
*
|
|
173
|
-
* @param el - The element whose accessible name stability is being checked
|
|
174
|
-
* @param document - The document containing the element, used to locate associated labels
|
|
175
|
-
* @returns `true` if the accessible name could change dynamically, `false` otherwise
|
|
176
|
-
*/
|
|
177
108
|
export function accnameMayBeMutable(
|
|
178
109
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
179
110
|
el,
|
|
@@ -189,18 +120,6 @@ document) {
|
|
|
189
120
|
return false;
|
|
190
121
|
}
|
|
191
122
|
export const labelable = ['button', 'input:not([type=hidden])', 'meter', 'output', 'progress', 'select', 'textarea'];
|
|
192
|
-
/**
|
|
193
|
-
* Finds the `<label>` element associated with a labelable form element.
|
|
194
|
-
* First checks for an ancestor `<label>`, then looks for a `<label>` whose
|
|
195
|
-
* `for` attribute references the element's `id`. Returns `null` if the
|
|
196
|
-
* element is not labelable or no associated label is found.
|
|
197
|
-
*
|
|
198
|
-
* @template V - The rule configuration value type
|
|
199
|
-
* @template O - The rule options type
|
|
200
|
-
* @param el - The element to find a label for (must be a labelable element)
|
|
201
|
-
* @param document - The document to search for labels with a matching `for` attribute
|
|
202
|
-
* @returns The associated `<label>` element, or `null` if none is found
|
|
203
|
-
*/
|
|
204
123
|
export function getOwnedLabel(
|
|
205
124
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
206
125
|
el,
|
|
@@ -218,38 +137,15 @@ document) {
|
|
|
218
137
|
}
|
|
219
138
|
return ownedLabel;
|
|
220
139
|
}
|
|
221
|
-
/**
|
|
222
|
-
* A generic, null-safe collection backed by a `Set`.
|
|
223
|
-
* Automatically filters out `null` and `undefined` values when items are added.
|
|
224
|
-
* Implements the iterable protocol so it can be used in `for...of` loops.
|
|
225
|
-
*
|
|
226
|
-
* @template T - The type of items stored in the collection
|
|
227
|
-
*/
|
|
140
|
+
/** `null`/`undefined` items are silently dropped on add. */
|
|
228
141
|
export class Collection {
|
|
229
142
|
#items = new Set();
|
|
230
|
-
/**
|
|
231
|
-
* Creates a new collection, optionally pre-populated with the given items.
|
|
232
|
-
* Any `null` or `undefined` values are silently ignored.
|
|
233
|
-
*
|
|
234
|
-
* @param items - Initial items to add to the collection
|
|
235
|
-
*/
|
|
236
143
|
constructor(...items) {
|
|
237
144
|
this.add(...items);
|
|
238
145
|
}
|
|
239
|
-
/**
|
|
240
|
-
* Returns an iterator over the items in the collection.
|
|
241
|
-
*
|
|
242
|
-
* @returns An iterator that yields each item in insertion order
|
|
243
|
-
*/
|
|
244
146
|
[Symbol.iterator]() {
|
|
245
147
|
return this.#items.values();
|
|
246
148
|
}
|
|
247
|
-
/**
|
|
248
|
-
* Adds one or more items to the collection.
|
|
249
|
-
* Any `null` or `undefined` values are silently ignored.
|
|
250
|
-
*
|
|
251
|
-
* @param items - Items to add to the collection
|
|
252
|
-
*/
|
|
253
149
|
add(...items) {
|
|
254
150
|
for (const item of items) {
|
|
255
151
|
if (item == null) {
|
|
@@ -258,34 +154,14 @@ export class Collection {
|
|
|
258
154
|
this.#items.add(item);
|
|
259
155
|
}
|
|
260
156
|
}
|
|
261
|
-
/**
|
|
262
|
-
* Returns a frozen array snapshot of the collection's contents.
|
|
263
|
-
*
|
|
264
|
-
* @returns A read-only array containing all items in insertion order
|
|
265
|
-
*/
|
|
266
157
|
toArray() {
|
|
267
158
|
return Object.freeze([...this.#items]);
|
|
268
159
|
}
|
|
269
160
|
}
|
|
270
|
-
/**
|
|
271
|
-
* Creates a deep, writable copy of the given value using structured cloning.
|
|
272
|
-
* Strips read-only modifiers from the result type so the clone can be freely mutated.
|
|
273
|
-
*
|
|
274
|
-
* @template T - The type of the value to clone
|
|
275
|
-
* @param value - The value to deep-copy
|
|
276
|
-
* @returns A mutable deep clone of the input value
|
|
277
|
-
*/
|
|
161
|
+
/** Strips read-only modifiers from the result type so the clone can be freely mutated. */
|
|
278
162
|
export function deepCopy(value) {
|
|
279
163
|
return structuredClone(value);
|
|
280
164
|
}
|
|
281
|
-
/**
|
|
282
|
-
* Computes a removal range from a list of nullable tokens.
|
|
283
|
-
* Filters out null/undefined tokens and tokens with empty `raw`,
|
|
284
|
-
* then returns the range spanning from the first to the last token.
|
|
285
|
-
*
|
|
286
|
-
* @param tokens - An array of nullable tokens to compute the range from
|
|
287
|
-
* @returns `[start, end]` tuple, or `null` if no valid tokens
|
|
288
|
-
*/
|
|
289
165
|
function tokenRange(tokens) {
|
|
290
166
|
const valid = tokens.filter((t) => t != null && t.raw.length > 0);
|
|
291
167
|
const first = valid[0];
|
|
@@ -295,14 +171,6 @@ function tokenRange(tokens) {
|
|
|
295
171
|
}
|
|
296
172
|
return [first.startOffset, last.startOffset + last.raw.length];
|
|
297
173
|
}
|
|
298
|
-
/**
|
|
299
|
-
* Creates a fix that removes an entire attribute (name + value + surrounding whitespace).
|
|
300
|
-
* Used by rules that need to remove a whole attribute from an element.
|
|
301
|
-
*
|
|
302
|
-
* @param fixer - The rule fixer instance for building TextEdits
|
|
303
|
-
* @param attr - The attribute token parts to remove (from `spacesBeforeName` through `endQuote`)
|
|
304
|
-
* @returns A TextEdit (or empty array if no valid tokens exist) that removes the attribute
|
|
305
|
-
*/
|
|
306
174
|
export function removeAttr(
|
|
307
175
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
308
176
|
fixer, attr) {
|
|
@@ -321,15 +189,6 @@ fixer, attr) {
|
|
|
321
189
|
}
|
|
322
190
|
return fixer.removeRange(range);
|
|
323
191
|
}
|
|
324
|
-
/**
|
|
325
|
-
* Creates a fix that removes only the value portion of an attribute
|
|
326
|
-
* (equals sign, quotes, and value), keeping the attribute name.
|
|
327
|
-
* Used by `no-boolean-attr-value` to convert `disabled="disabled"` to `disabled`.
|
|
328
|
-
*
|
|
329
|
-
* @param fixer - The rule fixer instance for building TextEdits
|
|
330
|
-
* @param attr - The attribute token parts to remove (from `spacesBeforeEqual` through `endQuote`)
|
|
331
|
-
* @returns A TextEdit (or empty array if no valid tokens exist) that removes the value portion
|
|
332
|
-
*/
|
|
333
192
|
export function removeAttrValue(
|
|
334
193
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
335
194
|
fixer, attr) {
|
package/lib/index.d.ts
CHANGED
|
@@ -6,16 +6,17 @@
|
|
|
6
6
|
* Each rule implements the {@link AnyRuleSeed} interface and covers
|
|
7
7
|
* areas such as accessibility, HTML validity, naming conventions, and coding style.
|
|
8
8
|
*/
|
|
9
|
+
export { ruleAliasTable } from './rule-aliases.js';
|
|
9
10
|
/**
|
|
10
11
|
* Registry of all built-in markuplint rules, mapping rule names to their seed definitions.
|
|
11
12
|
* Used by the markuplint core to initialize rule instances during linting.
|
|
12
13
|
*/
|
|
13
14
|
declare const rules: {
|
|
14
|
-
readonly '
|
|
15
|
+
readonly 'aria-prop-requires-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
15
16
|
readonly 'attr-order': Readonly<import("@markuplint/ml-core").RuleSeed<(string | {
|
|
16
17
|
name?: string;
|
|
17
18
|
pattern?: string;
|
|
18
|
-
group?: "data" | "
|
|
19
|
+
group?: "data" | "aria" | "global" | "event" | "spread";
|
|
19
20
|
order?: string[] | "alphabetical" | "source-order";
|
|
20
21
|
})[], {
|
|
21
22
|
alphabetical?: boolean;
|
|
@@ -23,120 +24,176 @@ declare const rules: {
|
|
|
23
24
|
readonly 'attr-value-quotes': Readonly<import("@markuplint/ml-core").RuleSeed<import("./attr-value-quotes/index.js").Type, undefined>>;
|
|
24
25
|
readonly 'case-sensitive-attr-name': Readonly<import("@markuplint/ml-core").RuleSeed<import("./case-sensitive-attr-name/index.js").Value, undefined>>;
|
|
25
26
|
readonly 'case-sensitive-tag-name': Readonly<import("@markuplint/ml-core").RuleSeed<import("./case-sensitive-tag-name/index.js").Value, undefined>>;
|
|
26
|
-
readonly 'character-reference': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
27
27
|
readonly 'class-naming': Readonly<import("@markuplint/ml-core").RuleSeed<import("./class-naming/index.js").Value, undefined>>;
|
|
28
|
-
readonly '
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
readonly 'deprecated-attr': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
32
|
-
readonly 'deprecated-element': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
33
|
-
readonly 'disallowed-element': Readonly<import("@markuplint/ml-core").RuleSeed<string[], undefined>>;
|
|
34
|
-
readonly doctype: Readonly<import("@markuplint/ml-core").RuleSeed<"always", {
|
|
35
|
-
denyObsoleteType: boolean;
|
|
36
|
-
}>>;
|
|
37
|
-
readonly 'end-tag': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
28
|
+
readonly 'consistent-table-row-length': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
29
|
+
readonly 'element-supports-aria-prop': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
30
|
+
readonly 'form-attr-references-form': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
38
31
|
readonly 'head-element-order': Readonly<import("@markuplint/ml-core").RuleSeed<import("./head-element-order/index.js").Value, undefined>>;
|
|
39
|
-
readonly '
|
|
40
|
-
readonly '
|
|
41
|
-
readonly '
|
|
42
|
-
readonly 'invalid-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
43
|
-
allowAttrs?: (string | {
|
|
44
|
-
name: string;
|
|
45
|
-
value: import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern;
|
|
46
|
-
})[] | Record<string, import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern>;
|
|
47
|
-
disallowAttrs?: (string | {
|
|
48
|
-
name: string;
|
|
49
|
-
value: import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern;
|
|
50
|
-
})[] | Record<string, import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern>;
|
|
51
|
-
ignoreAttrNamePrefix?: string | string[];
|
|
52
|
-
allowToAddPropertiesForPretender?: boolean;
|
|
53
|
-
}>>;
|
|
32
|
+
readonly 'input-list-references-datalist': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
33
|
+
readonly 'itemprop-requires-itemscope': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
34
|
+
readonly 'label-for-references-labelable': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
54
35
|
readonly 'label-has-control': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
55
|
-
readonly '
|
|
56
|
-
ignoreRoles: ("form" | ("main" | "banner" | "contentinfo") | "complementary" | "navigation" | "region")[];
|
|
57
|
-
labelEachArea: boolean;
|
|
58
|
-
}>>;
|
|
36
|
+
readonly 'label-no-multiple-controls': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
59
37
|
readonly 'link-types': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
60
38
|
readonly allowMicroformats?: boolean | readonly string[];
|
|
61
39
|
}>>;
|
|
62
|
-
readonly '
|
|
40
|
+
readonly 'map-id-name-match': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
41
|
+
readonly 'meta-charset-position': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
42
|
+
readonly 'meter-value-bounds': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
43
|
+
readonly 'no-abstract-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
44
|
+
readonly 'no-always-matching-source': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
63
45
|
readonly 'no-ambiguous-navigable-target-names': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
46
|
+
readonly 'no-aria-on-presentational-children': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
47
|
+
readonly 'no-aria-on-unsupported-element': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
64
48
|
readonly 'no-boolean-attr-value': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
49
|
+
readonly 'no-broken-fragment-link': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
|
|
50
|
+
fragmentRefersNameAttr: boolean;
|
|
51
|
+
}>>;
|
|
65
52
|
readonly 'no-consecutive-br': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
53
|
+
readonly 'no-content-after-body': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
54
|
+
readonly 'no-contradictory-aria-prop': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
55
|
+
readonly 'no-default-aria-value': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
66
56
|
readonly 'no-default-value': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
57
|
+
readonly 'no-deprecated-aria-prop': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
58
|
+
readonly 'no-deprecated-attr': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
59
|
+
readonly 'no-deprecated-element': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
60
|
+
readonly 'no-deprecated-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
61
|
+
readonly 'no-disallowed-ancestor': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
62
|
+
readonly 'no-disallowed-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
63
|
+
allowAttrs?: (string | {
|
|
64
|
+
name: string;
|
|
65
|
+
value: import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern;
|
|
66
|
+
})[] | Record<string, import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern>;
|
|
67
|
+
ignoreAttrNamePrefix?: string | string[];
|
|
68
|
+
}>>;
|
|
69
|
+
readonly 'no-duplicate-attr': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
67
70
|
readonly 'no-duplicate-autofocus': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
68
71
|
readonly 'no-duplicate-dt': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
72
|
+
readonly 'no-duplicate-h1': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./no-duplicate-h1/index.js").Options>>;
|
|
73
|
+
readonly 'no-duplicate-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
74
|
+
readonly 'no-duplicate-sibling-attr': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
69
75
|
readonly 'no-duplicate-visible-main': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
70
76
|
readonly 'no-empty-palpable-content': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
71
77
|
extendsExposableElements?: boolean;
|
|
72
78
|
ignoreIfAriaBusy?: boolean;
|
|
73
79
|
}>>;
|
|
74
|
-
readonly 'no-
|
|
80
|
+
readonly 'no-empty-table-track': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
81
|
+
readonly 'no-event-handler-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean | readonly string[], {
|
|
82
|
+
ignore?: string | string[];
|
|
83
|
+
}>>;
|
|
84
|
+
readonly 'no-experimental-features': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
85
|
+
readonly ignoreFeatures?: readonly string[];
|
|
86
|
+
}>>;
|
|
87
|
+
readonly 'no-extra-selected-options': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
88
|
+
readonly 'no-focusable-in-aria-hidden': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
89
|
+
readonly 'no-hardcoded-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
90
|
+
readonly 'no-ineffective-attr': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
91
|
+
readonly 'no-input-file-value': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
92
|
+
readonly 'no-invalid-aria-prop-value': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
93
|
+
readonly 'no-invalid-attr-value': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
94
|
+
allowAttrs?: (string | {
|
|
95
|
+
name: string;
|
|
96
|
+
value: import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern;
|
|
97
|
+
})[] | Record<string, import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern>;
|
|
98
|
+
}>>;
|
|
99
|
+
readonly 'no-malformed-character-reference': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
100
|
+
readonly 'no-mismatched-aspect-ratio': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
101
|
+
readonly documentRoot?: string;
|
|
102
|
+
}>>;
|
|
103
|
+
readonly 'no-mixed-srcset-descriptors': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
104
|
+
readonly 'no-nested-top-level-landmark': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
105
|
+
ignoreRoles: import("./landmark-roles/roles.js").Roles[];
|
|
106
|
+
}>>;
|
|
107
|
+
readonly 'no-nonstandard-features': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
108
|
+
readonly ignoreFeatures?: readonly string[];
|
|
109
|
+
}>>;
|
|
110
|
+
readonly 'no-obsolete-attr': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
111
|
+
readonly 'no-obsolete-doctype': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
112
|
+
readonly 'no-obsolete-element': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
75
113
|
readonly 'no-orphaned-end-tag': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
114
|
+
readonly 'no-prohibited-naming': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
115
|
+
readonly 'no-pseudo-list': Readonly<import("@markuplint/ml-core").RuleSeed<readonly string[], {
|
|
116
|
+
spaceNeededBullets?: string[];
|
|
117
|
+
noPrev?: boolean;
|
|
118
|
+
prevElement?: boolean;
|
|
119
|
+
prevComment?: boolean;
|
|
120
|
+
prevCodeBlock?: boolean;
|
|
121
|
+
}>>;
|
|
122
|
+
readonly 'no-redundant-accessible-name': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
|
|
123
|
+
checkTitleFallback: boolean;
|
|
124
|
+
checkPlaceholderFallback: boolean;
|
|
125
|
+
}>>;
|
|
126
|
+
readonly 'no-redundant-aria-prop': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
127
|
+
readonly 'no-redundant-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
76
128
|
readonly 'no-refer-to-non-existent-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
|
|
77
129
|
ariaVersion: import("@markuplint/ml-spec").ARIAVersion | undefined;
|
|
78
|
-
fragmentRefersNameAttr: boolean;
|
|
79
130
|
}>>;
|
|
80
|
-
readonly 'no-
|
|
131
|
+
readonly 'no-restricted-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
132
|
+
disallowAttrs?: (string | {
|
|
133
|
+
name: string;
|
|
134
|
+
value: import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern;
|
|
135
|
+
})[] | Record<string, import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern>;
|
|
136
|
+
}>>;
|
|
137
|
+
readonly 'no-restricted-element': Readonly<import("@markuplint/ml-core").RuleSeed<string[], undefined>>;
|
|
138
|
+
readonly 'no-skipped-heading-level': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
139
|
+
readonly 'no-stray-head-or-body-tag': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
140
|
+
readonly 'no-table-cell-overlap': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
141
|
+
readonly 'no-table-span-overflow': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
142
|
+
readonly 'no-unclosed-element-at-eof': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
143
|
+
readonly 'no-unescaped-char': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
144
|
+
strict?: boolean;
|
|
145
|
+
}>>;
|
|
146
|
+
readonly 'no-unknown-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
147
|
+
allowAttrs?: (string | {
|
|
148
|
+
name: string;
|
|
149
|
+
value: import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern;
|
|
150
|
+
})[] | Record<string, import("@markuplint/ml-spec").AttributeType | import("@markuplint/types").Pattern>;
|
|
151
|
+
ignoreAttrNamePrefix?: string | string[];
|
|
152
|
+
allowToAddPropertiesForPretender?: boolean;
|
|
153
|
+
}>>;
|
|
154
|
+
readonly 'no-unknown-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
155
|
+
readonly 'no-unpaired-srcset-sizes': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
156
|
+
readonly 'no-unsupported-browser-features': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
81
157
|
readonly browserslist?: string | readonly string[];
|
|
82
158
|
readonly browserslistConfig?: string;
|
|
83
159
|
readonly browserslistEnv?: string;
|
|
84
160
|
readonly ignoreFeatures?: readonly string[];
|
|
85
|
-
readonly checkExperimental?: boolean;
|
|
86
|
-
readonly checkNonStandard?: boolean;
|
|
87
|
-
}>>;
|
|
88
|
-
readonly 'no-use-event-handler-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean | readonly string[], {
|
|
89
|
-
ignore?: string | string[];
|
|
90
161
|
}>>;
|
|
91
162
|
readonly 'permitted-contents': Readonly<import("@markuplint/ml-core").RuleSeed<import("./permitted-contents/types.js").TagRule[], import("./permitted-contents/types.js").Options>>;
|
|
163
|
+
readonly 'permitted-roles': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
92
164
|
readonly 'placeholder-label-option': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
93
|
-
readonly '
|
|
94
|
-
checkTitleFallback: boolean;
|
|
95
|
-
checkPlaceholderFallback: boolean;
|
|
96
|
-
}>>;
|
|
165
|
+
readonly 'progress-value-bounds': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
97
166
|
readonly 'require-accessible-name': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
|
|
98
167
|
ariaVersion: import("@markuplint/ml-spec").ARIAVersion | undefined;
|
|
99
168
|
}>>;
|
|
100
|
-
readonly 'require-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
readonly 'require-
|
|
104
|
-
readonly 'required-attr': Readonly<import("@markuplint/ml-core").RuleSeed<string | (string | {
|
|
169
|
+
readonly 'require-adjacent-popover': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
170
|
+
readonly 'require-ancestor': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
171
|
+
readonly 'require-aria-prop': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
172
|
+
readonly 'require-attr': Readonly<import("@markuplint/ml-core").RuleSeed<string | (string | {
|
|
105
173
|
name: string;
|
|
106
174
|
value?: string | string[];
|
|
107
175
|
})[], {
|
|
108
176
|
readonly ignoreAttrs?: readonly string[];
|
|
109
177
|
}>>;
|
|
110
|
-
readonly '
|
|
178
|
+
readonly 'require-datetime': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
179
|
+
langs?: import("./require-datetime/types.js").Lang[];
|
|
180
|
+
}>>;
|
|
181
|
+
readonly 'require-dialog-autofocus': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
182
|
+
readonly 'require-doctype': Readonly<import("@markuplint/ml-core").RuleSeed<"always", undefined>>;
|
|
183
|
+
readonly 'require-element': Readonly<import("@markuplint/ml-core").RuleSeed<string[], {
|
|
111
184
|
ignoreHasMutableContents: boolean;
|
|
112
185
|
ignoreOmittedElements: boolean;
|
|
113
186
|
}>>;
|
|
114
|
-
readonly '
|
|
115
|
-
readonly '
|
|
116
|
-
readonly '
|
|
117
|
-
readonly '
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
readonly '
|
|
125
|
-
readonly 'wai-aria-abstract-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
126
|
-
readonly 'wai-aria-default-value': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
127
|
-
readonly 'wai-aria-deprecated-props': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
128
|
-
readonly 'wai-aria-deprecated-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
129
|
-
readonly 'wai-aria-disallowed-props': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
130
|
-
readonly 'wai-aria-implicit-props': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
131
|
-
readonly 'wai-aria-implicit-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
132
|
-
readonly 'wai-aria-interaction-in-hidden': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
133
|
-
readonly 'wai-aria-no-global-prop': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
134
|
-
readonly 'wai-aria-non-existent-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
135
|
-
readonly 'wai-aria-permitted-roles': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
136
|
-
readonly 'wai-aria-presentational-children': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
137
|
-
readonly 'wai-aria-required-owned-elements': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
138
|
-
readonly 'wai-aria-required-parent-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
139
|
-
readonly 'wai-aria-required-props': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
140
|
-
readonly 'wai-aria-value': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
187
|
+
readonly 'require-end-tag': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
188
|
+
readonly 'require-h1': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./require-h1/index.js").Options>>;
|
|
189
|
+
readonly 'require-landmark-label': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
190
|
+
readonly 'require-owned-elements': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
191
|
+
readonly 'require-parent-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
192
|
+
readonly 'role-supports-aria-prop': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
193
|
+
readonly 'sizes-auto-requires-lazy-loading': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
194
|
+
readonly 'tab-requires-tabpanel': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
195
|
+
readonly 'usemap-references-map': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
196
|
+
readonly 'valid-importmap': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
197
|
+
readonly 'valid-speculation-rules': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
141
198
|
};
|
|
142
199
|
export default rules;
|