Update
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
diff --git a/src/index.js b/src/index.js
|
||||
index 2fa185f..627af9b 100644
|
||||
index 2fa185f..29d65d0 100644
|
||||
--- a/src/index.js
|
||||
+++ b/src/index.js
|
||||
@@ -1,48 +1,90 @@
|
||||
@ -135,68 +135,7 @@ index 2fa185f..627af9b 100644
|
||||
};
|
||||
|
||||
const recommendedRules = {
|
||||
@@ -60,15 +102,7 @@ const recommendedRules = {
|
||||
'jsx-a11y/control-has-associated-label': [
|
||||
'off',
|
||||
{
|
||||
- ignoreElements: [
|
||||
- 'audio',
|
||||
- 'canvas',
|
||||
- 'embed',
|
||||
- 'input',
|
||||
- 'textarea',
|
||||
- 'tr',
|
||||
- 'video',
|
||||
- ],
|
||||
+ ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
|
||||
ignoreRoles: [
|
||||
'grid',
|
||||
'listbox',
|
||||
@@ -139,24 +173,8 @@ const recommendedRules = {
|
||||
'jsx-a11y/no-noninteractive-element-to-interactive-role': [
|
||||
'error',
|
||||
{
|
||||
- ul: [
|
||||
- 'listbox',
|
||||
- 'menu',
|
||||
- 'menubar',
|
||||
- 'radiogroup',
|
||||
- 'tablist',
|
||||
- 'tree',
|
||||
- 'treegrid',
|
||||
- ],
|
||||
- ol: [
|
||||
- 'listbox',
|
||||
- 'menu',
|
||||
- 'menubar',
|
||||
- 'radiogroup',
|
||||
- 'tablist',
|
||||
- 'tree',
|
||||
- 'treegrid',
|
||||
- ],
|
||||
+ ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
||||
+ ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
||||
li: [
|
||||
'menuitem',
|
||||
'menuitemradio',
|
||||
@@ -214,15 +232,7 @@ const strictRules = {
|
||||
'jsx-a11y/control-has-associated-label': [
|
||||
'off',
|
||||
{
|
||||
- ignoreElements: [
|
||||
- 'audio',
|
||||
- 'canvas',
|
||||
- 'embed',
|
||||
- 'input',
|
||||
- 'textarea',
|
||||
- 'tr',
|
||||
- 'video',
|
||||
- ],
|
||||
+ ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
|
||||
ignoreRoles: [
|
||||
'grid',
|
||||
'listbox',
|
||||
@@ -299,22 +309,22 @@ const jsxA11y = {
|
||||
@@ -299,10 +341,10 @@ const jsxA11y = {
|
||||
const createConfig = (rules, flatConfigName) => ({
|
||||
...(flatConfigName
|
||||
? {
|
||||
@ -211,21 +150,6 @@ index 2fa185f..627af9b 100644
|
||||
: { ...legacyConfigBase, plugins: ['jsx-a11y'] }),
|
||||
rules: { ...rules },
|
||||
});
|
||||
|
||||
// Create configs for the plugin object
|
||||
-const configs = {
|
||||
+export const configs = {
|
||||
recommended: createConfig(recommendedRules),
|
||||
strict: createConfig(strictRules),
|
||||
};
|
||||
-const flatConfigs = {
|
||||
+export const flatConfigs = {
|
||||
recommended: createConfig(recommendedRules, 'recommended'),
|
||||
strict: createConfig(strictRules, 'strict'),
|
||||
};
|
||||
|
||||
-module.exports = { ...jsxA11y, configs, flatConfigs };
|
||||
+export default { ...jsxA11y, configs, flatConfigs };
|
||||
diff --git a/src/util/mayContainChildComponent.js b/src/util/mayContainChildComponent.js
|
||||
index 43a03ef..5e1035e 100644
|
||||
--- a/src/util/mayContainChildComponent.js
|
||||
|
Reference in New Issue
Block a user