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