Commit 90d49f83 authored by Ethan Cohen's avatar Ethan Cohen Committed by Dan Abramov
Browse files

[dependency] - Add select eslint-plugin-jsx-a11y rules to lint config. (#175)

This project is a really good use case to apply some accessibility
rules to the lint config. For beginners getting started with React, we
can also teach/enforce basic accessibility rules in the web at author
time.

For now, I’ve just applied to the rules that are listed in
`eslint-config-airbnb` because these are most real-world tested, and we
can continue to add.

Happy to help if there are any questions/issues/concerns about the
plugin!
parent 9dc23a34
No related merge requests found
Showing with 9 additions and 2 deletions
+9 -2
......@@ -24,7 +24,7 @@ module.exports = {
parser: 'babel-eslint',
// import plugin is termporarily disabled, scroll below to see why
plugins: ['react'/*, 'import'*/],
plugins: ['react'/*, 'import'*/, 'jsx-a11y'],
env: {
es6: true,
......@@ -191,6 +191,12 @@ module.exports = {
'react/no-direct-mutation-state': WARNING,
'react/no-is-mounted': WARNING,
'react/react-in-jsx-scope': WARNING,
'react/require-render-return': WARNING
'react/require-render-return': WARNING,
// https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules
'jsx-a11y/aria-role': WARNING,
'jsx-a11y/img-has-alt': WARNING,
'jsx-a11y/img-redundant-alt': WARNING,
'jsx-a11y/no-access-key': WARNING
}
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment