Added jsx-a11y plugin
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
a7aeded009
commit
095a31c8fb
39
ROADMAP.md
39
ROADMAP.md
@ -328,6 +328,45 @@
|
|||||||
- [ ] "prefer-default-export"
|
- [ ] "prefer-default-export"
|
||||||
- [ ] "unambiguous"
|
- [ ] "unambiguous"
|
||||||
|
|
||||||
|
## jsx-a11y
|
||||||
|
|
||||||
|
- [ ] "accessible-emoji"
|
||||||
|
- [ ] "alt-text"
|
||||||
|
- [ ] "anchor-has-content"
|
||||||
|
- [ ] "anchor-is-valid"
|
||||||
|
- [ ] "aria-activedescendant-has-tabindex"
|
||||||
|
- [ ] "aria-props"
|
||||||
|
- [ ] "aria-proptypes"
|
||||||
|
- [ ] "aria-role"
|
||||||
|
- [ ] "aria-unsupported-elements"
|
||||||
|
- [ ] "autocomplete-valid"
|
||||||
|
- [ ] "click-events-have-key-events"
|
||||||
|
- [ ] "control-has-associated-label"
|
||||||
|
- [ ] "heading-has-content"
|
||||||
|
- [ ] "html-has-lang"
|
||||||
|
- [ ] "iframe-has-title"
|
||||||
|
- [ ] "img-redundant-alt"
|
||||||
|
- [ ] "interactive-supports-focus"
|
||||||
|
- [ ] "label-has-associated-control"
|
||||||
|
- [ ] "label-has-for"
|
||||||
|
- [ ] "lang"
|
||||||
|
- [ ] "media-has-caption"
|
||||||
|
- [ ] "mouse-events-have-key-events"
|
||||||
|
- [ ] "no-access-key"
|
||||||
|
- [ ] "no-autofocus"
|
||||||
|
- [ ] "no-distracting-elements"
|
||||||
|
- [ ] "no-interactive-element-to-noninteractive-role"
|
||||||
|
- [ ] "no-noninteractive-element-interactions"
|
||||||
|
- [ ] "no-noninteractive-element-to-interactive-role"
|
||||||
|
- [ ] "no-noninteractive-tabindex"
|
||||||
|
- [ ] "no-onchange"
|
||||||
|
- [ ] "no-redundant-roles"
|
||||||
|
- [ ] "no-static-element-interactions"
|
||||||
|
- [ ] "role-has-required-aria-props"
|
||||||
|
- [ ] "role-supports-aria-props"
|
||||||
|
- [ ] "scope"
|
||||||
|
- [ ] "tabindex-no-positive"
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
- [ ] "detect-buffer-noassert"
|
- [ ] "detect-buffer-noassert"
|
||||||
|
78
package-lock.json
generated
78
package-lock.json
generated
@ -30,6 +30,15 @@
|
|||||||
"js-tokens": "^4.0.0"
|
"js-tokens": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@babel/runtime": {
|
||||||
|
"version": "7.10.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
|
||||||
|
"integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"regenerator-runtime": "^0.13.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@rollup/plugin-json": {
|
"@rollup/plugin-json": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz",
|
||||||
@ -219,6 +228,16 @@
|
|||||||
"sprintf-js": "~1.0.2"
|
"sprintf-js": "~1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"aria-query": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ast-types-flow": "0.0.7",
|
||||||
|
"commander": "^2.11.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"array-includes": {
|
"array-includes": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz",
|
||||||
@ -240,12 +259,24 @@
|
|||||||
"es-abstract": "^1.17.0-next.1"
|
"es-abstract": "^1.17.0-next.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ast-types-flow": {
|
||||||
|
"version": "0.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz",
|
||||||
|
"integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"astral-regex": {
|
"astral-regex": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
|
||||||
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
|
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"axobject-query": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-ICt34ZmrVt8UQnvPl6TVyDTkmhXmAyAT4Jh5ugfGUX4MOrZ+U/ZY6/sdylRw3qGNr9Ub5AJsaHeDMzNLehRdOQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
@ -365,6 +396,12 @@
|
|||||||
"which": "^2.0.1"
|
"which": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"damerau-levenshtein": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz",
|
||||||
|
"integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||||
@ -675,6 +712,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eslint-plugin-jsx-a11y": {
|
||||||
|
"version": "6.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz",
|
||||||
|
"integrity": "sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.4.5",
|
||||||
|
"aria-query": "^3.0.0",
|
||||||
|
"array-includes": "^3.0.3",
|
||||||
|
"ast-types-flow": "^0.0.7",
|
||||||
|
"axobject-query": "^2.0.2",
|
||||||
|
"damerau-levenshtein": "^1.0.4",
|
||||||
|
"emoji-regex": "^7.0.2",
|
||||||
|
"has": "^1.0.3",
|
||||||
|
"jsx-ast-utils": "^2.2.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"emoji-regex": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||||
|
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-plugin-security": {
|
"eslint-plugin-security": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz",
|
||||||
@ -1357,6 +1419,16 @@
|
|||||||
"minimist": "^1.2.0"
|
"minimist": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"jsx-ast-utils": {
|
||||||
|
"version": "2.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.4.1.tgz",
|
||||||
|
"integrity": "sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"array-includes": "^3.1.1",
|
||||||
|
"object.assign": "^4.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"levn": {
|
"levn": {
|
||||||
"version": "0.4.1",
|
"version": "0.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
|
||||||
@ -1717,6 +1789,12 @@
|
|||||||
"read-pkg": "^2.0.0"
|
"read-pkg": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"regenerator-runtime": {
|
||||||
|
"version": "0.13.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
|
||||||
|
"integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"regexp-tree": {
|
"regexp-tree": {
|
||||||
"version": "0.1.21",
|
"version": "0.1.21",
|
||||||
"resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz",
|
"resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz",
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
"eslint": "^7.2.0",
|
"eslint": "^7.2.0",
|
||||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||||
"eslint-plugin-import": "^2.21.2",
|
"eslint-plugin-import": "^2.21.2",
|
||||||
|
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||||
"eslint-plugin-security": "^1.4.0",
|
"eslint-plugin-security": "^1.4.0",
|
||||||
"eslint-plugin-sonarjs": "^0.5.0",
|
"eslint-plugin-sonarjs": "^0.5.0",
|
||||||
"eslint-plugin-unicorn": "^20.1.0",
|
"eslint-plugin-unicorn": "^20.1.0",
|
||||||
@ -34,6 +35,7 @@
|
|||||||
"eslint": "^7.2.0",
|
"eslint": "^7.2.0",
|
||||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||||
"eslint-plugin-import": "^2.21.2",
|
"eslint-plugin-import": "^2.21.2",
|
||||||
|
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||||
"eslint-plugin-security": "^1.4.0",
|
"eslint-plugin-security": "^1.4.0",
|
||||||
"eslint-plugin-sonarjs": "^0.5.0",
|
"eslint-plugin-sonarjs": "^0.5.0",
|
||||||
"eslint-plugin-unicorn": "^20.1.0",
|
"eslint-plugin-unicorn": "^20.1.0",
|
||||||
|
15
src/react-javascript.ts
Normal file
15
src/react-javascript.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import rJsxA11y from "./rules/jsx-a11y/default.json";
|
||||||
|
import rDefault from "./rules/react/default.json";
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
"extends": [
|
||||||
|
"./javascript",
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"jsx-a11y",
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
...rDefault,
|
||||||
|
...rJsxA11y,
|
||||||
|
},
|
||||||
|
};
|
1
src/rules/jsx-a11y/default.json
Normal file
1
src/rules/jsx-a11y/default.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
1
src/rules/react/default.json
Normal file
1
src/rules/react/default.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
Loading…
x
Reference in New Issue
Block a user