moxystudio / eslint-config

MOXY eslint configuration to be used across several JavaScript projects
MIT License
13 stars 5 forks source link

feat: implement jsx-a11y addon #75

Closed threequartersjohn closed 4 years ago

threequartersjohn commented 5 years ago

This plugin implements an addon with our choice of rules from eslint-plugin-jsx-a11y.

So far, it explicitly excludes two rules:

Otherwise, all other rules are set as errors.

codecov[bot] commented 5 years ago

Codecov Report

Merging #75 into master will not change coverage by %. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #75   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           37        40    +3     
  Lines           45        48    +3     
=========================================
+ Hits            45        48    +3     
Impacted Files Coverage Δ
packages/eslint-config-react-a11y/index.js 100.00% <100.00%> (ø)
packages/eslint-config-react-a11y/lib/jsx-a11y.js 100.00% <100.00%> (ø)
...ackages/eslint-config-react-a11y/rules/jsx-a11y.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d741761...0f79add. Read the comment docs.

threequartersjohn commented 4 years ago

It seems that treating all these new rules as errors seem pretty aggressive. I think that a good portion of them should be warnings. Thoughts?

I'm ok with this. Though, we'll maybe need to revise this once a11y becomes a legal concern. At that point it would perhaps be better for most of them to be errors. But as it concerns this initial implementation, perhaps a "trial" period before a harsher implementation is a more effective way to go.

threequartersjohn commented 4 years ago

Rules have now been reduced to warnings, with the exception of rules protecting against grammatical errors or otherwise any invalid aria- props (e.g. aria-props or lang).