Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Conversation

petrhanak
Copy link
Contributor

@petrhanak petrhanak commented Aug 1, 2017

Fixes #18.

@robertrossmann
Copy link
Member

Thanks @petrhanak for the PR! When we discussed this addition with @dannytce we came to a conclusion that we cannot use their recommended ruleset because they set all the rules to error. I would like to keep that level to rules which detect broken, completely anti-pattern or otherwise extremely bad code. The rules in this plugin represent recommended best practices, therefore the rules should all be set to warn.

Could you please add the rules individually with their levels reduced down to warn? Thanks!

@petrhanak
Copy link
Contributor Author

fixed error => warn and also added comments of what rules mean

Copy link
Member

@robertrossmann robertrossmann left a comment

Choose a reason for hiding this comment

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

Very nice! Melikes. ❤️

@robertrossmann
Copy link
Member

Waiting for additional review from @dannytce before merging.

@robertrossmann
Copy link
Member

Idea: Would it make sense to split the rules into yet another configuration file instead of adding it to the optional.js ? Something like accessibility.js in the react family.

What do you think @petrhanak @dannytce?

// between options will trigger the onChange event in some browsers. Regardless, when a change
// of context results from an onBlur event or an onChange event, the user should be notified of
// the change unless it occurs below the currently focused element.
'jsx-a11y/no-onchange': 'warn',
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's have this one as an error, because it breaks Safari

// Some HTML elements have native semantics that are implemented by the browser. This includes
// default/implicit ARIA roles. Setting an ARIA role that matches its default/implicit role is
// redundant since it is already set by the browser.
'jsx-a11y/no-redundant-roles': 'warn',
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's have this one as an error. It's a good practise to enforce developers to do that.

Copy link
Member

Choose a reason for hiding this comment

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

If it's not absolutely terrible practice I would prefer keeping this at warn level. Best practices should not cause a failure in your test/deployment pipeline.

@robertrossmann
Copy link
Member

@dannytce Are you okay with the changes made and with my comment on your review?

@petrhanak Some last things that need be done on this before we can (finally!) merge:

  • Please update the main README.md's Available rulesets section
  • Please update the environments/react/README.md with a more detailed information about the new ruleset
  • Once done, please squash all the commits into a single commit and rebase on current master, there are some conflicts

Thank you for your efforts on this!

@robertrossmann
Copy link
Member

Thanks, merged! I will release this together with #22 (once that's merged, too).

🍻 🎉 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants