components
components copied to clipboard
chore: Disallow unsafe usages of `any` in some components
Description
This PR enables some stricter ESLint rules that detect when we use the any
type in an unsafe way. It also fixes some of these unsafe usages.
It does not cover all components yet, but the other components might follow in the future.
Related links, issue #, if available: AWSUI-21112
How has this been tested?
Tested locally by running npm run lint
.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
- Changes include appropriate documentation updates.
-
Changes are backward-compatible if not indicated, see
CONTRIBUTING.md
. -
Changes do not include unsupported browser features, see
CONTRIBUTING.md
. - Changes were manually tested for accessibility, see accessibility guidelines.
Security
-
If the code handles URLs: all URLs are validated through the
checkSafeUrl
function.
Testing
- Changes are covered with new/existing unit tests?
- Changes are covered with new/existing integration tests?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.