File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -14,21 +14,27 @@ import includes from 'array-includes';
14
14
import has from 'has' ;
15
15
import type { JSXOpeningElement } from 'ast-types-flow' ;
16
16
import type { ESLintContext } from '../../flow/eslint' ;
17
- import { generateObjSchema } from '../util/schemas' ;
18
17
import getExplicitRole from '../util/getExplicitRole' ;
19
18
import getImplicitRole from '../util/getImplicitRole' ;
20
19
21
20
const errorMessage = ( element , implicitRole ) =>
22
21
`The element ${ element } has an implicit role of ${ implicitRole } . Defining this explicitly is redundant and should be avoided.` ;
23
22
24
- const schema = generateObjSchema ( ) ;
25
-
26
23
module . exports = {
27
24
meta : {
28
25
docs : {
29
26
url : 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/no-redundant-roles.md' ,
30
27
} ,
31
- schema : [ schema ] ,
28
+ schema : [ {
29
+ type : 'object' ,
30
+ additionalProperties : {
31
+ type : 'array' ,
32
+ items : {
33
+ type : 'string' ,
34
+ } ,
35
+ uniqueItems : true ,
36
+ } ,
37
+ } ] ,
32
38
} ,
33
39
34
40
create : ( context : ESLintContext ) => {
You can’t perform that action at this time.
0 commit comments