UNPKG

2.54 kBJavaScriptView Raw
1'use strict';
2
3module.exports = {
4 plugins: ['jsx-a11y'],
5
6 rules: {
7 'jsx-a11y/accessible-emoji': 'warn',
8 'jsx-a11y/alt-text': 'warn',
9 'jsx-a11y/anchor-has-content': 'warn',
10 'jsx-a11y/anchor-is-valid': 'warn',
11 'jsx-a11y/aria-activedescendant-has-tabindex': 'warn',
12 'jsx-a11y/aria-props': 'warn',
13 'jsx-a11y/aria-proptypes': 'warn',
14 'jsx-a11y/aria-role': 'warn',
15 'jsx-a11y/aria-unsupported-elements': 'warn',
16 'jsx-a11y/click-events-have-key-events': 'warn',
17 'jsx-a11y/heading-has-content': 'warn',
18 'jsx-a11y/html-has-lang': 'warn',
19 'jsx-a11y/img-redundant-alt': 'warn',
20 'jsx-a11y/interactive-supports-focus': 'warn',
21 'jsx-a11y/label-has-for': 'off',
22 'jsx-a11y/media-has-caption': 'warn',
23 'jsx-a11y/mouse-events-have-key-events': 'warn',
24 'jsx-a11y/no-distracting-elements': 'error',
25
26 'jsx-a11y/no-interactive-element-to-noninteractive-role': [
27 'error',
28 {
29 tr: ['none', 'presentation'],
30 },
31 ],
32 // 'jsx-a11y/no-noninteractive-element-interactions': [
33 // 'warn',
34 // {
35 // handlers: [
36 // 'onClick',
37 // 'onMouseDown',
38 // 'onMouseUp',
39 // 'onKeyPress',
40 // 'onKeyDown',
41 // 'onKeyUp',
42 // ],
43 // },
44 // ],
45 'jsx-a11y/no-noninteractive-element-to-interactive-role': [
46 'warn',
47 {
48 ul: [
49 'listbox',
50 'menu',
51 'menubar',
52 'radiogroup',
53 'tablist',
54 'tree',
55 'treegrid',
56 ],
57 ol: [
58 'listbox',
59 'menu',
60 'menubar',
61 'radiogroup',
62 'tablist',
63 'tree',
64 'treegrid',
65 ],
66 li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],
67 table: ['grid'],
68 td: ['gridcell'],
69 },
70 ],
71 'jsx-a11y/no-noninteractive-tabindex': [
72 'warn',
73 {
74 tags: [],
75 roles: ['tabpanel'],
76 },
77 ],
78 'jsx-a11y/no-onchange': 'warn',
79 'jsx-a11y/no-redundant-roles': 'warn',
80 // 'jsx-a11y/no-static-element-interactions': [
81 // 'warn',
82 // {
83 // handlers: [
84 // 'onClick',
85 // 'onMouseDown',
86 // 'onMouseUp',
87 // 'onKeyPress',
88 // 'onKeyDown',
89 // 'onKeyUp',
90 // ],
91 // },
92 // ],
93 'jsx-a11y/role-has-required-aria-props': 'warn',
94 'jsx-a11y/role-supports-aria-props': 'warn',
95 'jsx-a11y/scope': 'warn',
96 'jsx-a11y/tabindex-no-positive': 'warn',
97 },
98};
\No newline at end of file