Skip to content
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

feat(eslint): add react a11y plugin #365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat(eslint): add react a11y plugin #365

wants to merge 1 commit into from

Conversation

ismay
Copy link
Member

@ismay ismay commented Mar 10, 2021

This adds https://www.npmjs.com/package/eslint-plugin-jsx-a11y and enables the recommended preset. The plugin also ships with a strict preset, but I thought that starting out permissive is probably nicer for consumers of cli-style.

Copy link
Contributor

@HendrikThePendric HendrikThePendric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This plugin is also very good to add, but I think that with the recommended settings enabled this is going to cause havoc in existing apps which typically do very poorly on a11y.

The recommended settings will throw errors so after upgrading cli-style the app dev will have to fix ALL a11y issues before the code can be merged.

If this plugin has the ability to fix the issues it detects, I think this would be much less of a problem, but I don't know if this is possible and expect it isn't.

So perhaps we should include this plugin but only throw warnings?

@HendrikThePendric
Copy link
Contributor

I thought that starting out permissive is probably nicer for consumers of cli-style.

The recommended preset doesn't appear to be very permissive 😒 .

@ismay
Copy link
Member Author

ismay commented Mar 10, 2021

I thought that starting out permissive is probably nicer for consumers of cli-style.

The recommended preset doesn't appear to be very permissive 😒 .

Hmm yeah that's not as permissive as I'd like. Ok, I'll see if I can come up with something more permissive.

@ismay
Copy link
Member Author

ismay commented Mar 10, 2021

I took a look, but I'm not sure what the best approach would be here. I could set all the recommended rules to warn (depending on whether we eventually want to go with warn for cli-style or not). Or we could start with a couple of rules and set those to errors. But I'm not sure which rules would be most important to us.

I haven't encountered any errors with the scheduler, which made me think that it's fairly permissive, but it does actually have a fair amount of rules that can error out. Ideas?

@varl
Copy link
Contributor

varl commented Jun 4, 2021

We can make this opt in to add, so we'd do e.g. d2-style add eslint react-a11y to enable it, so apps can choose when to let havoc be wrought.

@ismay
Copy link
Member Author

ismay commented Jun 7, 2021

We can make this opt in to add, so we'd do e.g. d2-style add eslint react-a11y to enable it, so apps can choose when to let havoc be wrought.

Yeah that sounds good to me. That way we can keep the config simple by just following the recommended settings.

@stale
Copy link

stale bot commented Mar 2, 2022

Hi!

Due to a lack of activity on this issue over time (180 days) it seems to be stale. If still relevant, please provide information that moves it forward, e.g. additional information, a pull request with suggested changes, or a reason to keep it open.

Any activity will keep it open, otherwise it will be closed automatically in 30 days. Thanks! 🤖

@stale stale bot added the stale label Mar 2, 2022
@stale
Copy link

stale bot commented Apr 16, 2022

Automatically closing due to lack of activity. 🤖

@stale stale bot closed this Apr 16, 2022
@ismay ismay reopened this Oct 11, 2022
@ismay ismay removed the request for review from varl October 11, 2022 08:05
@amcgee amcgee removed their request for review April 25, 2024 09:05
@stale stale bot removed the stale label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants