@pplancq/eslint-config 6.0.17 → 6.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
1
+ import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
2
2
 
3
3
  export const reactJsxA11yRules = {
4
4
  plugins: {
5
- 'jsx-a11y': jsxA11yPlugin,
5
+ "jsx-a11y": jsxA11yPlugin,
6
6
  },
7
7
  rules: {
8
8
  // eslint-plugin-jsx-a11y https://github.com/jsx-eslint/eslint-plugin-jsx-a11y?tab=readme-ov-file
@@ -10,14 +10,14 @@ export const reactJsxA11yRules = {
10
10
  // Enforce emojis are wrapped in <span> and provide screenreader access.
11
11
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/accessible-emoji.md
12
12
  // This rule is deprecated.
13
- 'jsx-a11y/accessible-emoji': 'off',
13
+ "jsx-a11y/accessible-emoji": "off",
14
14
 
15
15
  // Enforce all elements that require alternative text have meaningful information to relay back to end user.
16
16
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/alt-text.md
17
- 'jsx-a11y/alt-text': [
18
- 'error',
17
+ "jsx-a11y/alt-text": [
18
+ "error",
19
19
  {
20
- elements: ['img', 'object', 'area', 'input[type="image"]'],
20
+ elements: ["img", "object", "area", 'input[type="image"]'],
21
21
  img: [],
22
22
  object: [],
23
23
  area: [],
@@ -27,66 +27,66 @@ export const reactJsxA11yRules = {
27
27
 
28
28
  // Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".
29
29
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-ambiguous-text.md
30
- 'jsx-a11y/anchor-ambiguous-text': 'off',
30
+ "jsx-a11y/anchor-ambiguous-text": "off",
31
31
 
32
32
  // Enforce all anchors to contain accessible content.
33
33
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-has-content.md
34
- 'jsx-a11y/anchor-has-content': ['error', { components: [] }],
34
+ "jsx-a11y/anchor-has-content": ["error", { components: [] }],
35
35
 
36
36
  // Enforce all anchors are valid, navigable elements.
37
37
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-is-valid.md
38
- 'jsx-a11y/anchor-is-valid': [
39
- 'error',
40
- { components: ['Link'], specialLink: ['to'], aspects: ['noHref', 'invalidHref', 'preferButton'] },
38
+ "jsx-a11y/anchor-is-valid": [
39
+ "error",
40
+ { components: ["Link"], specialLink: ["to"], aspects: ["noHref", "invalidHref", "preferButton"] },
41
41
  ],
42
42
 
43
43
  // Enforce elements with `aria-activedescendant` are tabbable.
44
44
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-activedescendant-has-tabindex.md
45
- 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
45
+ "jsx-a11y/aria-activedescendant-has-tabindex": "error",
46
46
 
47
47
  // Enforce all `aria-*` props are valid.
48
48
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-props.md
49
- 'jsx-a11y/aria-props': 'error',
49
+ "jsx-a11y/aria-props": "error",
50
50
 
51
51
  // Enforce ARIA state and property values are valid.
52
52
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-proptypes.md
53
- 'jsx-a11y/aria-proptypes': 'error',
53
+ "jsx-a11y/aria-proptypes": "error",
54
54
 
55
55
  // Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
56
56
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-role.md
57
- 'jsx-a11y/aria-role': ['error', { ignoreNonDOM: false }],
57
+ "jsx-a11y/aria-role": ["error", { ignoreNonDOM: false }],
58
58
 
59
59
  // Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
60
60
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-unsupported-elements.md
61
- 'jsx-a11y/aria-unsupported-elements': 'error',
61
+ "jsx-a11y/aria-unsupported-elements": "error",
62
62
 
63
63
  // Enforce that `autocomplete` attributes are used correctly.
64
64
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/autocomplete-valid.md
65
- 'jsx-a11y/autocomplete-valid': ['off', { inputComponents: [] }],
65
+ "jsx-a11y/autocomplete-valid": ["off", { inputComponents: [] }],
66
66
 
67
67
  // Enforce a clickable non-interactive element has at least one keyboard event listener.
68
68
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/click-events-have-key-events.md
69
- 'jsx-a11y/click-events-have-key-events': 'error',
69
+ "jsx-a11y/click-events-have-key-events": "error",
70
70
 
71
71
  // Enforce that a control (an interactive element) has a text label.
72
72
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md
73
- 'jsx-a11y/control-has-associated-label': [
74
- 'error',
73
+ "jsx-a11y/control-has-associated-label": [
74
+ "error",
75
75
  {
76
- labelAttributes: ['label'],
76
+ labelAttributes: ["label"],
77
77
  controlComponents: [],
78
- ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
78
+ ignoreElements: ["audio", "canvas", "embed", "input", "textarea", "tr", "video"],
79
79
  ignoreRoles: [
80
- 'grid',
81
- 'listbox',
82
- 'menu',
83
- 'menubar',
84
- 'radiogroup',
85
- 'row',
86
- 'tablist',
87
- 'toolbar',
88
- 'tree',
89
- 'treegrid',
80
+ "grid",
81
+ "listbox",
82
+ "menu",
83
+ "menubar",
84
+ "radiogroup",
85
+ "row",
86
+ "tablist",
87
+ "toolbar",
88
+ "tree",
89
+ "treegrid",
90
90
  ],
91
91
  depth: 5,
92
92
  },
@@ -94,127 +94,127 @@ export const reactJsxA11yRules = {
94
94
 
95
95
  // Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
96
96
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md
97
- 'jsx-a11y/heading-has-content': ['error', { components: [''] }],
97
+ "jsx-a11y/heading-has-content": ["error", { components: [""] }],
98
98
 
99
99
  // Enforce `<html>` element has `lang` prop.
100
100
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/html-has-lang.md
101
- 'jsx-a11y/html-has-lang': 'error',
101
+ "jsx-a11y/html-has-lang": "error",
102
102
 
103
103
  // Enforce `iframe` elements have a `title` attribute.
104
104
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/iframe-has-title.md
105
- 'jsx-a11y/iframe-has-title': 'error',
105
+ "jsx-a11y/iframe-has-title": "error",
106
106
 
107
107
  // Enforce `<img>` `alt` prop does not contain the word "image", "picture", or "photo".
108
108
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/img-redundant-alt.md
109
- 'jsx-a11y/img-redundant-alt': 'error',
109
+ "jsx-a11y/img-redundant-alt": "error",
110
110
 
111
111
  // Enforce that elements with interactive handlers like `onClick` must be focusable.
112
112
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/interactive-supports-focus.md
113
- 'jsx-a11y/interactive-supports-focus': 'error',
113
+ "jsx-a11y/interactive-supports-focus": "error",
114
114
 
115
115
  // Enforce that a `label` tag has a text label and an associated control.
116
116
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md
117
- 'jsx-a11y/label-has-associated-control': [
118
- 'error',
119
- { labelComponents: [], labelAttributes: [], controlComponents: [], assert: 'both', depth: 25 },
117
+ "jsx-a11y/label-has-associated-control": [
118
+ "error",
119
+ { labelComponents: [], labelAttributes: [], controlComponents: [], assert: "both", depth: 25 },
120
120
  ],
121
121
 
122
122
  // Enforce that `<label>` elements have the `htmlFor` prop.
123
123
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-for.md
124
124
  // This rule is deprecated. It was replaced by jsx-a11y/label-has-associated-control.
125
- 'jsx-a11y/label-has-for': ['off', { components: [], required: { every: ['nesting', 'id'] }, allowChildren: false }],
125
+ "jsx-a11y/label-has-for": ["off", { components: [], required: { every: ["nesting", "id"] }, allowChildren: false }],
126
126
 
127
127
  // Enforce `lang` attribute has a valid value.
128
128
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/lang.md
129
- 'jsx-a11y/lang': 'error',
129
+ "jsx-a11y/lang": "error",
130
130
 
131
131
  // Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
132
132
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/media-has-caption.md
133
- 'jsx-a11y/media-has-caption': ['error', { audio: [], video: [], track: [] }],
133
+ "jsx-a11y/media-has-caption": ["error", { audio: [], video: [], track: [] }],
134
134
 
135
135
  // Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users.
136
136
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/mouse-events-have-key-events.md
137
- 'jsx-a11y/mouse-events-have-key-events': 'error',
137
+ "jsx-a11y/mouse-events-have-key-events": "error",
138
138
 
139
139
  // Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screenreader.
140
140
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-access-key.md
141
- 'jsx-a11y/no-access-key': 'error',
141
+ "jsx-a11y/no-access-key": "error",
142
142
 
143
143
  // Disallow `aria-hidden="true"` from being set on focusable elements.
144
144
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-aria-hidden-on-focusable.md
145
- 'jsx-a11y/no-aria-hidden-on-focusable': 'off',
145
+ "jsx-a11y/no-aria-hidden-on-focusable": "off",
146
146
 
147
147
  // Enforce `autoFocus` prop is not used.
148
148
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-autofocus.md
149
- 'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }],
149
+ "jsx-a11y/no-autofocus": ["error", { ignoreNonDOM: true }],
150
150
 
151
151
  // Enforce distracting elements are not used.
152
152
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-distracting-elements.md
153
- 'jsx-a11y/no-distracting-elements': ['error', { elements: ['marquee', 'blink'] }],
153
+ "jsx-a11y/no-distracting-elements": ["error", { elements: ["marquee", "blink"] }],
154
154
 
155
155
  // Interactive elements should not be assigned non-interactive roles.
156
156
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-interactive-element-to-noninteractive-role.md
157
- 'jsx-a11y/no-interactive-element-to-noninteractive-role': ['error', { tr: ['none', 'presentation'] }],
157
+ "jsx-a11y/no-interactive-element-to-noninteractive-role": ["error", { tr: ["none", "presentation"] }],
158
158
 
159
159
  // Non-interactive elements should not be assigned mouse or keyboard event listeners.
160
160
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-element-interactions.md
161
- 'jsx-a11y/no-noninteractive-element-interactions': [
162
- 'error',
163
- { handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'] },
161
+ "jsx-a11y/no-noninteractive-element-interactions": [
162
+ "error",
163
+ { handlers: ["onClick", "onMouseDown", "onMouseUp", "onKeyPress", "onKeyDown", "onKeyUp"] },
164
164
  ],
165
165
 
166
166
  // Non-interactive elements should not be assigned interactive roles.
167
167
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-element-to-interactive-role.md
168
- 'jsx-a11y/no-noninteractive-element-to-interactive-role': [
169
- 'error',
168
+ "jsx-a11y/no-noninteractive-element-to-interactive-role": [
169
+ "error",
170
170
  {
171
- ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
172
- ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
173
- li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],
174
- table: ['grid'],
175
- td: ['gridcell'],
171
+ ul: ["listbox", "menu", "menubar", "radiogroup", "tablist", "tree", "treegrid"],
172
+ ol: ["listbox", "menu", "menubar", "radiogroup", "tablist", "tree", "treegrid"],
173
+ li: ["menuitem", "option", "row", "tab", "treeitem"],
174
+ table: ["grid"],
175
+ td: ["gridcell"],
176
176
  },
177
177
  ],
178
178
 
179
179
  // `tabIndex` should only be declared on interactive elements.
180
180
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-noninteractive-tabindex.md
181
- 'jsx-a11y/no-noninteractive-tabindex': ['error', { tags: [], roles: ['tabpanel'] }],
181
+ "jsx-a11y/no-noninteractive-tabindex": ["error", { tags: [], roles: ["tabpanel"] }],
182
182
 
183
183
  // Enforce usage of `onBlur` over `onChange` on select menus for accessibility.
184
184
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-onchange.md
185
185
  // This rule is deprecated.
186
186
  // Deprecated: This rule is based on reports of behavior of old browsers (eg. IE 10 and below). In the meantime, this behavior has been corrected, both in newer versions of browsers as well as in the DOM spec.
187
- 'jsx-a11y/no-onchange': 'off',
187
+ "jsx-a11y/no-onchange": "off",
188
188
 
189
189
  // Enforce explicit `role` property is not the same as implicit/default `role` property on element.
190
190
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-redundant-roles.md
191
- 'jsx-a11y/no-redundant-roles': 'error',
191
+ "jsx-a11y/no-redundant-roles": "error",
192
192
 
193
193
  // Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the `role` attribute.
194
194
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-static-element-interactions.md
195
- 'jsx-a11y/no-static-element-interactions': [
196
- 'error',
197
- { handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'] },
195
+ "jsx-a11y/no-static-element-interactions": [
196
+ "error",
197
+ { handlers: ["onClick", "onMouseDown", "onMouseUp", "onKeyPress", "onKeyDown", "onKeyUp"] },
198
198
  ],
199
199
 
200
200
  // Enforces using semantic DOM elements over the ARIA role property.
201
201
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/prefer-tag-over-role.md
202
- 'jsx-a11y/prefer-tag-over-role': 'off',
202
+ "jsx-a11y/prefer-tag-over-role": "off",
203
203
 
204
204
  // Enforce that elements with ARIA roles must have all required attributes for that `role`.
205
205
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-has-required-aria-props.md
206
- 'jsx-a11y/role-has-required-aria-props': 'error',
206
+ "jsx-a11y/role-has-required-aria-props": "error",
207
207
 
208
208
  // Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.
209
209
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/role-supports-aria-props.md
210
- 'jsx-a11y/role-supports-aria-props': 'error',
210
+ "jsx-a11y/role-supports-aria-props": "error",
211
211
 
212
212
  // Enforce `scope` prop is only used on `<th>` elements.
213
213
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/scope.md
214
- 'jsx-a11y/scope': 'error',
214
+ "jsx-a11y/scope": "error",
215
215
 
216
216
  // Enforce `tabIndex` value is not greater than zero.
217
217
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/tabindex-no-positive.md
218
- 'jsx-a11y/tabindex-no-positive': 'error',
218
+ "jsx-a11y/tabindex-no-positive": "error",
219
219
  },
220
220
  };