UNPKG

2.8 kBJavaScriptView Raw
1const OFF = 0
2const ERROR = 2
3
4module.exports = {
5 plugins: [
6 'jsx-a11y'
7 ],
8 parserOptions: {
9 ecmaFeatures: {
10 jsx: true
11 }
12 },
13 rules: {
14 'jsx-a11y/accessible-emoji': ERROR,
15 'jsx-a11y/alt-text': [ ERROR, {
16 elements: [ 'img', 'object', 'area', 'input[type="image"]' ],
17 img: [],
18 object: [],
19 area: [],
20 'input[type="image"]': []
21 } ],
22 'jsx-a11y/anchor-has-content': [ ERROR, { components: [ '' ] } ],
23 'jsx-a11y/aria-activedescendant-has-tabindex': ERROR,
24 'jsx-a11y/aria-props': ERROR,
25 'jsx-a11y/aria-proptypes': ERROR,
26 'jsx-a11y/aria-role': [ ERROR, { ignoreNonDom: false } ],
27 'jsx-a11y/aria-unsupported-elements': ERROR,
28 'jsx-a11y/click-events-have-key-events': OFF,
29 'jsx-a11y/heading-has-content': [ ERROR, { components: [ '' ] } ],
30 'jsx-a11y/href-no-hash': [ OFF, { components: [ 'a' ] } ],
31 'jsx-a11y/html-has-lang': ERROR,
32 'jsx-a11y/iframe-has-title': ERROR,
33 'jsx-a11y/img-redundant-alt': ERROR,
34 'jsx-a11y/interactive-supports-focus': ERROR,
35 'jsx-a11y/label-has-for': [ OFF, { components: [ 'label' ] } ],
36 'jsx-a11y/lang': ERROR,
37 'jsx-a11y/media-has-caption': [ ERROR, {
38 audio: [],
39 video: [],
40 track: []
41 } ],
42 'jsx-a11y/mouse-events-have-key-events': OFF,
43 'jsx-a11y/no-access-key': ERROR,
44 'jsx-a11y/no-autofocus': [ ERROR, { ignoreNonDOM: true } ],
45 'jsx-a11y/no-distracting-elements': [ ERROR, {
46 elements: [ 'marquee', 'blink' ]
47 } ],
48 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ ERROR, {
49 tr: [ 'none', 'presentation' ]
50 } ],
51 'jsx-a11y/no-noninteractive-element-interactions': [ ERROR, {
52 handlers: [
53 'onClick',
54 'onMouseDown',
55 'onMouseUp',
56 'onKeyPress',
57 'onKeyDown',
58 'onKeyUp'
59 ]
60 } ],
61 'jsx-a11y/no-noninteractive-element-to-interactive-role': [ ERROR, {
62 ul: [ 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid' ],
63 ol: [ 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid' ],
64 li: [ 'menuitem', 'option', 'row', 'tab', 'treeitem' ],
65 table: [ 'grid' ],
66 td: [ 'gridcell' ]
67 } ],
68 'jsx-a11y/no-noninteractive-tabindex': [ ERROR, {
69 tags: [],
70 roles: [ 'tabpanel' ]
71 } ],
72 'jsx-a11y/no-onchange': ERROR,
73 'jsx-a11y/no-redundant-roles': ERROR,
74 'jsx-a11y/no-static-element-interactions': [ ERROR, {
75 handlers: [
76 'onClick',
77 'onMouseDown',
78 'onMouseUp',
79 'onKeyPress',
80 'onKeyDown',
81 'onKeyUp'
82 ]
83 } ],
84 'jsx-a11y/role-has-required-aria-props': ERROR,
85 'jsx-a11y/role-supports-aria-props': ERROR,
86 'jsx-a11y/scope': ERROR,
87 'jsx-a11y/tabindex-no-positive': ERROR
88 }
89}