Skip to content

Commit

Permalink
feat(jsx-a11y): Add JSX a11y and upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Jul 16, 2016
1 parent fae6adc commit ee63d1b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Or in combination with the base config (recommended)
- `ava`: [AVA](https://npmjs.com/package/ava) testing framework
- `babel-module-alias`: [babel-plugin-module-alias](https://www.npmjs.com/package/babel-plugin-module-alias) for the import plugin to work with the module-alias babel plugin
- `babel-react-require`: [babel-plugin-react-require](https://www.npmjs.com/package/babel-plugin-react-require) for when you're using the react-require babel plugin (should be used with `"kentcdodds/react"` as well).
- `jsx-a11y`: [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) for rules regarding accessibility with JSX.
- `mocha`: [mocha](https://npmjs.com/package/mocha) testing framework
- `react`: [React](https://www.npmjs.com/package/react) JS library
- `webpack`: [Webpack](https://npmjs.com/package/webpack) for the import plugin to work with webpack overloaded imports/requires
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ module.exports = {
"linebreak-style": [2, "unix"],
"max-lines": [2, {"max": 500, "skipBlankLines": false, "skipComments": false}],
"max-statements-per-line": [2, {"max": 1}],
"multiline-ternary": 0,
"new-parens": 2,
"newline-after-var": 0,
"newline-before-return": 0,
Expand Down
34 changes: 34 additions & 0 deletions jsx-a11y.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
"env": {
"browser": true,
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
},
},
"plugins": ["jsx-a11y"],
"rules": {
"jsx-a11y/aria-props": 2,
"jsx-a11y/aria-proptypes": 2,
"jsx-a11y/aria-role": 2,
"jsx-a11y/aria-unsupported-elements": 2,
"jsx-a11y/heading-has-content": 2,
"jsx-a11y/href-no-hash": 2,
"jsx-a11y/html-has-lang": 2,
"jsx-a11y/img-has-alt": 2,
"jsx-a11y/img-redundant-alt": 2,
"jsx-a11y/label-has-for": 2,
"jsx-a11y/lang": 2,
"jsx-a11y/mouse-events-have-key-events": 2,
"jsx-a11y/no-access-key": 2,
"jsx-a11y/no-marquee": 2,
"jsx-a11y/no-onchange": 0,
"jsx-a11y/onclick-has-focus": 2,
"jsx-a11y/onclick-has-role": 2,
"jsx-a11y/role-has-required-aria-props": 2,
"jsx-a11y/role-supports-aria-props": 2,
"jsx-a11y/scope": 2,
"jsx-a11y/tabindex-no-positive": 1,
}
}
3 changes: 3 additions & 0 deletions other/test/jsx-a11y.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"extends": ["../../index.js", "../../jsx-a11y.js"],
}
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"find-new-rules:ava": "eslint-find-rules --unused ./other/test/ava.js",
"find-new-rules:babel-module-alias": "eslint-find-rules --unused ./other/test/babel-module-alias.js",
"find-new-rules:babel-react-require": "eslint-find-rules --unused ./other/test/babel-react-require.js",
"find-new-rules:jsx-a11y": "eslint-find-rules --unused ./other/test/jsx-a11y.js",
"find-new-rules:main": "eslint-find-rules --unused ./index.js",
"find-new-rules:mocha": "eslint-find-rules --unused ./other/test/mocha.js",
"find-new-rules:react": "eslint-find-rules --unused ./other/test/react.js",
Expand All @@ -36,12 +37,13 @@
},
"homepage": "https://github.com/kentcdodds/eslint-config-kentcdodds#readme",
"dependencies": {
"babel-eslint": "6.1.0",
"eslint-import-resolver-babel-module-alias": "1.3.0",
"babel-eslint": "6.1.2",
"eslint-import-resolver-babel-module-alias": "1.4.2",
"eslint-import-resolver-webpack": "^0.3.2",
"eslint-plugin-ava": "2.5.0",
"eslint-plugin-babel": "3.3.0",
"eslint-plugin-import": "^1.6.1",
"eslint-plugin-jsx-a11y": "2.0.1",
"eslint-plugin-mocha": "^4.0.0",
"eslint-plugin-react": "^5.2.2"
},
Expand All @@ -51,8 +53,8 @@
"devDependencies": {
"commitizen": "2.8.2",
"cz-conventional-changelog": "1.1.6",
"eslint": "3.0.1",
"eslint-find-rules": "1.11.0",
"eslint": "3.1.0",
"eslint-find-rules": "1.11.1",
"eslint-plugin-mocha": "4.0.0",
"ghooks": "1.3.2",
"npm-run-all": "2.3.0",
Expand Down

0 comments on commit ee63d1b

Please sign in to comment.