aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-06-18 10:01:17 +0300
committerValentin Popov <info@valentineus.link>2020-06-18 10:01:17 +0300
commit095a31c8fb4575dd1b02d4c10a188368398e0749 (patch)
treef7b6dc1f01d309e5ddb751201aea3abcc90b485d
parenta7aeded00994c56e4a6f24f53944b159be3a253d (diff)
downloadeslint-config-095a31c8fb4575dd1b02d4c10a188368398e0749.tar.xz
eslint-config-095a31c8fb4575dd1b02d4c10a188368398e0749.zip
Added jsx-a11y plugin
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--ROADMAP.md39
-rw-r--r--package-lock.json78
-rw-r--r--package.json2
-rw-r--r--src/react-javascript.ts15
-rw-r--r--src/rules/jsx-a11y/default.json1
-rw-r--r--src/rules/react/default.json1
6 files changed, 136 insertions, 0 deletions
diff --git a/ROADMAP.md b/ROADMAP.md
index e7e9612..1ef7307 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -328,6 +328,45 @@
- [ ] "prefer-default-export"
- [ ] "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
- [ ] "detect-buffer-noassert"
diff --git a/package-lock.json b/package-lock.json
index e083b9b..d3edb9a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -30,6 +30,15 @@
"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": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz",
@@ -219,6 +228,16 @@
"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": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz",
@@ -240,12 +259,24 @@
"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": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
"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": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
@@ -365,6 +396,12 @@
"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": {
"version": "4.1.1",
"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": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz",
@@ -1357,6 +1419,16 @@
"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": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
@@ -1717,6 +1789,12 @@
"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": {
"version": "0.1.21",
"resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz",
diff --git a/package.json b/package.json
index 14c5419..75e09f9 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
"eslint": "^7.2.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.21.2",
+ "eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-unicorn": "^20.1.0",
@@ -34,6 +35,7 @@
"eslint": "^7.2.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.21.2",
+ "eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-unicorn": "^20.1.0",
diff --git a/src/react-javascript.ts b/src/react-javascript.ts
new file mode 100644
index 0000000..813e859
--- /dev/null
+++ b/src/react-javascript.ts
@@ -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,
+ },
+};
diff --git a/src/rules/jsx-a11y/default.json b/src/rules/jsx-a11y/default.json
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/src/rules/jsx-a11y/default.json
@@ -0,0 +1 @@
+{}
diff --git a/src/rules/react/default.json b/src/rules/react/default.json
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/src/rules/react/default.json
@@ -0,0 +1 @@
+{}