UNPKG

3.51 kBJavaScriptView Raw
1module.exports = {
2 extends: '@3fs',
3 plugins: ['jsx-a11y'],
4 /*
5 * View link below for a11y rules documentation
6 * https://github.com/evcohen/eslint-plugin-jsx-a11y#supported-rules
7 */
8 rules: {
9 'jsx-a11y/anchor-has-content': ['error', { components: [''] }],
10 'jsx-a11y/aria-role': ['error', { ignoreNonDom: false }],
11 'jsx-a11y/aria-props': 'error',
12 'jsx-a11y/autocomplete-valid': ['off', {
13 inputComponents: []
14 }],
15 'jsx-a11y/aria-proptypes': 'error',
16 'jsx-a11y/aria-unsupported-elements': 'error',
17 'jsx-a11y/alt-text': [
18 'error',
19 {
20 'elements': [
21 'img',
22 'object',
23 'area',
24 'input[type="image"]'
25 ],
26 'img': [],
27 'object': [],
28 'area': [],
29 'input[type="image"]': []
30 }
31 ],
32 'jsx-a11y/img-redundant-alt': 'error',
33 'jsx-a11y/mouse-events-have-key-events': 'off',
34 'jsx-a11y/no-access-key': 'error',
35 'jsx-a11y/no-onchange': 'off',
36 'jsx-a11y/interactive-supports-focus': 'error',
37 'jsx-a11y/role-has-required-aria-props': 'error',
38 'jsx-a11y/role-supports-aria-props': 'error',
39 'jsx-a11y/tabindex-no-positive': 'error',
40 'jsx-a11y/heading-has-content': ['error', { components: [''] }],
41 'jsx-a11y/html-has-lang': 'error',
42 'jsx-a11y/label-has-associated-control': 'error',
43 'jsx-a11y/lang': 'error',
44 'jsx-a11y/no-distracting-elements': ['error', { elements: ['marquee', 'blink'] }],
45 'jsx-a11y/scope': 'error',
46 'jsx-a11y/click-events-have-key-events': 'off',
47 'jsx-a11y/control-has-associated-label': 'off',
48 'jsx-a11y/no-static-element-interactions': [
49 'error',
50 {
51 handlers: [
52 'onClick',
53 'onMouseDown',
54 'onMouseUp',
55 'onKeyPress',
56 'onKeyDown',
57 'onKeyUp'
58 ]
59 }
60 ],
61 'jsx-a11y/no-noninteractive-element-interactions': [
62 'error',
63 {
64 handlers: [
65 'onClick',
66 'onMouseDown',
67 'onMouseUp',
68 'onKeyPress',
69 'onKeyDown',
70 'onKeyUp'
71 ]
72 }
73 ],
74 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
75 'jsx-a11y/iframe-has-title': 'error',
76 'jsx-a11y/no-autofocus': 'off',
77 'jsx-a11y/no-redundant-roles': 'error',
78 'jsx-a11y/media-has-caption': [
79 'error',
80 {
81 audio: [],
82 video: [],
83 track: []
84 }
85 ],
86 'jsx-a11y/no-interactive-element-to-noninteractive-role': ['error', { tr: ['none', 'presentation'] }],
87 'jsx-a11y/no-noninteractive-element-to-interactive-role': [
88 'error',
89 {
90 ul: [
91 'listbox',
92 'menu',
93 'menubar',
94 'radiogroup',
95 'tablist',
96 'tree',
97 'treegrid'
98 ],
99 ol: [
100 'listbox',
101 'menu',
102 'menubar',
103 'radiogroup',
104 'tablist',
105 'tree',
106 'treegrid'
107 ],
108 li: [
109 'menuitem',
110 'option',
111 'row',
112 'tab',
113 'treeitem'
114 ],
115 table: ['grid'],
116 td: ['gridcell']
117 }
118 ],
119 'jsx-a11y/no-noninteractive-tabindex': [
120 'error',
121 {
122 tags: [],
123 roles: ['tabpanel']
124 }
125 ],
126 'jsx-a11y/anchor-is-valid': [
127 'off',
128 {
129 components: ['Link'],
130 specialLink: [],
131 aspects: [
132 'noHref',
133 'invalidHref',
134 'preferButton'
135 ]
136 }
137 ]
138 }
139};