Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(eslint-plugin): [no-input-rename] handle alias and
inputs
metad…
…ata property (#583)
- Loading branch information
1 parent
675ee11
commit 2883e18
Showing
3 changed files
with
498 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
packages/eslint-plugin/src/utils/get-aria-attribute-keys.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
let ariaAttributeKeys: ReadonlySet<string> | null = null; | ||
|
||
export function getAriaAttributeKeys(): ReadonlySet<string> { | ||
return ( | ||
ariaAttributeKeys ?? | ||
(ariaAttributeKeys = new Set<string>([ | ||
// Source: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques | ||
'aria-activedescendant', | ||
'aria-atomic', | ||
'aria-autocomplete', | ||
'aria-busy', | ||
'aria-checked', | ||
'aria-colcount', | ||
'aria-colindex', | ||
'aria-colspan', | ||
'aria-controls', | ||
'aria-current', | ||
'aria-describedby', | ||
'aria-details', | ||
'aria-disabled', | ||
'aria-dragged', | ||
'aria-dropeffect', | ||
'aria-errormessage', | ||
'aria-expanded', | ||
'aria-flowto', | ||
'aria-haspopup', | ||
'aria-hidden', | ||
'aria-invalid', | ||
'aria-label', | ||
'aria-labelledby', | ||
'aria-level', | ||
'aria-live', | ||
'aria-modal', | ||
'aria-multiline', | ||
'aria-multiselectable', | ||
'aria-orientation', | ||
'aria-owns', | ||
'aria-placeholder', | ||
'aria-posinset', | ||
'aria-pressed', | ||
'aria-readonly', | ||
'aria-relevant', | ||
'aria-required', | ||
'aria-rowcount', | ||
'aria-rowindex', | ||
'aria-rowspan', | ||
'aria-selected', | ||
'aria-setsize', | ||
'aria-sort', | ||
'aria-valuemax', | ||
'aria-valuemin', | ||
'aria-valuenow', | ||
'aria-valuetext', | ||
])) | ||
); | ||
} |
Oops, something went wrong.