-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move react/jsx-a11y rules into shared react preset #49244
Conversation
💔 Build Failed |
One suggestion comes to mind: Could this PR set up the overall config but with overrides to disable the rules again in individual plugins? Then each team could follow up in their own PRs, fix the rules and remove the overrides eventually. |
I think I'm missing something. Why the focus on jsx-a11y here? Adding up the numbers in the summary, it looks like there are 542 errors. Doing a find on the full list of violations for (The only other a11y error is "onBlur must be used instead of onchange..." which should be a quick fix.) |
Okay awesome, then my assumption was wrong :D Even better, but having only a couple of a11y issues hanging around, do you think we could help fixing those across the different plugins? |
On one hand, yes, we/I could submit a PR fixing all of the a11y issues. On the other hand, that doesn't solve the broader linting problem (so I don't see the hurry) and it shielded people from learning about/practicing keyboard accessibility in a pretty approachable way (linting pointing to a specific line with good messaging and more docs online). From an a11y education standpoint, I'd certainly rather see the plugin maintainers fix the issues and jump into to help them if it's unclear or review PRs or however else they might need support. |
This comment has been minimized.
This comment has been minimized.
Pinging @elastic/kibana-operations (Team:Operations) |
💚 Build Succeeded |
53 errors come from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ML changes LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App Architecture code changes LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
infra
changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces changes LGTM
I'm going to approve on behalf of operations and move on without Canvas so others can get working on removing their overrides. |
* move react/jsx-a11y rules into shared react preset * autofix react/jsx-closing-tag-location * autofix react/no-unknown-property * manually fix react/no-unescaped-entities * maually fix react/jsx-pascal-case * manually fix react/prefer-stateless-function * disable known violations in specific plugins/areas * remove code override # Conflicts: # x-pack/legacy/plugins/upgrade_assistant/public/components/tabs/checkup/deprecations/reindex/flyout/warnings_step.tsx
7.x/7.6: 0ee219e |
This removes the two eslint exceptions specific to the `infra` plugin introduced in elastic#49244. fixes elastic#49563
It was pointed out that the react lint rules were only applied to JS files when we moved TS linting over to ESLint. This has been the case for a long time, so we have a lot of violations.
I'm not 100% sure about what we should do here, many of these violations can be auto-fixed, but those autofixes include adding dependencies to hooks which don't just work out of the box without inspection, and might cause undesirable effects, so someone is going to need to carefully consider many of these fixes.
Full list of violations: https://gist.github.com/spalger/b3702d46b004f485c9bcea29f6a0e36c
A summary of violation count by area:
I'm not really sure what to do here so I'm pushing this up for ideas.