@wistia/eslint-config 1.5.0 → 1.5.2
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @wistia/eslint-config
|
|
2
2
|
|
|
3
|
+
## 1.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#418](https://github.com/wistia/eslint-config/pull/418) [`7ad0310`](https://github.com/wistia/eslint-config/commit/7ad03102734ff7f50677f3a938bea6c9e0b17166) Thanks [@okize](https://github.com/okize)! - fix: temporarily disable `@typescript-eslint/no-useless-default-assignment` rule'
|
|
8
|
+
|
|
9
|
+
## 1.5.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#416](https://github.com/wistia/eslint-config/pull/416) [`516a7ab`](https://github.com/wistia/eslint-config/commit/516a7ab19ce5b2a4bd44ecf25e9a2adad5e3b729) Thanks [@okize](https://github.com/okize)! - fix: disable `styled-components-a11y/lang` rule since it is causing issues
|
|
14
|
+
|
|
3
15
|
## 1.5.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/package.json
CHANGED
package/src/rules/react-a11y.mjs
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
// ensure emoji are accessible
|
|
6
|
-
// https://github.com/
|
|
6
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md
|
|
7
7
|
// disabled; rule is deprecated
|
|
8
8
|
// 'jsx-a11y/accessible-emoji': 'off',
|
|
9
9
|
|
|
10
10
|
// Enforce that all elements that require alternative text have meaningful information
|
|
11
|
-
// https://github.com/
|
|
11
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md
|
|
12
12
|
'jsx-a11y/alt-text': [
|
|
13
13
|
'error',
|
|
14
14
|
{
|
|
@@ -21,11 +21,11 @@ export default {
|
|
|
21
21
|
],
|
|
22
22
|
|
|
23
23
|
// Enforce that anchors have content
|
|
24
|
-
// https://github.com/
|
|
24
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md
|
|
25
25
|
'jsx-a11y/anchor-has-content': ['error', { components: [] }],
|
|
26
26
|
|
|
27
27
|
// ensure <a> tags are valid
|
|
28
|
-
// https://github.com/
|
|
28
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md
|
|
29
29
|
'jsx-a11y/anchor-is-valid': [
|
|
30
30
|
'error',
|
|
31
31
|
{
|
|
@@ -36,24 +36,24 @@ export default {
|
|
|
36
36
|
],
|
|
37
37
|
|
|
38
38
|
// elements with aria-activedescendant must be tabbable
|
|
39
|
-
// https://github.com/
|
|
39
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md
|
|
40
40
|
'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
|
|
41
41
|
|
|
42
42
|
// Enforce all aria-* props are valid.
|
|
43
|
-
// https://github.com/
|
|
43
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md
|
|
44
44
|
'jsx-a11y/aria-props': 'error',
|
|
45
45
|
|
|
46
46
|
// Enforce ARIA state and property values are valid.
|
|
47
|
-
// https://github.com/
|
|
47
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md
|
|
48
48
|
'jsx-a11y/aria-proptypes': 'error',
|
|
49
49
|
|
|
50
50
|
// Require ARIA roles to be valid and non-abstract
|
|
51
|
-
// https://github.com/
|
|
51
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md
|
|
52
52
|
'jsx-a11y/aria-role': ['error', { ignoreNonDOM: false }],
|
|
53
53
|
|
|
54
54
|
// Enforce that elements that do not support ARIA roles, states, and
|
|
55
55
|
// properties do not have those attributes.
|
|
56
|
-
// https://github.com/
|
|
56
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md
|
|
57
57
|
'jsx-a11y/aria-unsupported-elements': 'error',
|
|
58
58
|
|
|
59
59
|
// Ensure the autocomplete attribute is correct and suitable for the form field it is used with
|
|
@@ -66,11 +66,11 @@ export default {
|
|
|
66
66
|
],
|
|
67
67
|
|
|
68
68
|
// require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress
|
|
69
|
-
// https://github.com/
|
|
69
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md
|
|
70
70
|
'jsx-a11y/click-events-have-key-events': 'error',
|
|
71
71
|
|
|
72
72
|
// Enforce that a control (an interactive element) has a text label.
|
|
73
|
-
// https://github.com/
|
|
73
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md
|
|
74
74
|
'jsx-a11y/control-has-associated-label': [
|
|
75
75
|
'error',
|
|
76
76
|
{
|
|
@@ -94,27 +94,27 @@ export default {
|
|
|
94
94
|
],
|
|
95
95
|
|
|
96
96
|
// ensure <hX> tags have content and are not aria-hidden
|
|
97
|
-
// https://github.com/
|
|
97
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md
|
|
98
98
|
'jsx-a11y/heading-has-content': ['error', { components: [''] }],
|
|
99
99
|
|
|
100
100
|
// require HTML elements to have a "lang" prop
|
|
101
|
-
// https://github.com/
|
|
101
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md
|
|
102
102
|
'jsx-a11y/html-has-lang': 'error',
|
|
103
103
|
|
|
104
104
|
// ensure iframe elements have a unique title
|
|
105
|
-
// https://github.com/
|
|
105
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md
|
|
106
106
|
'jsx-a11y/iframe-has-title': 'error',
|
|
107
107
|
|
|
108
108
|
// Prevent img alt text from containing redundant words like "image", "picture", or "photo"
|
|
109
|
-
// https://github.com/
|
|
109
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md
|
|
110
110
|
'jsx-a11y/img-redundant-alt': 'error',
|
|
111
111
|
|
|
112
112
|
// Elements with an interactive role and interaction handlers must be focusable
|
|
113
|
-
// https://github.com/
|
|
113
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md
|
|
114
114
|
'jsx-a11y/interactive-supports-focus': 'error',
|
|
115
115
|
|
|
116
116
|
// Enforce that a label tag has a text label and an associated control.
|
|
117
|
-
// https://github.com/
|
|
117
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md
|
|
118
118
|
'jsx-a11y/label-has-associated-control': [
|
|
119
119
|
'error',
|
|
120
120
|
{
|
|
@@ -127,11 +127,11 @@ export default {
|
|
|
127
127
|
],
|
|
128
128
|
|
|
129
129
|
// require HTML element's lang prop to be valid
|
|
130
|
-
// https://github.com/
|
|
130
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md
|
|
131
131
|
'jsx-a11y/lang': 'error',
|
|
132
132
|
|
|
133
133
|
// media elements must have captions
|
|
134
|
-
// https://github.com/
|
|
134
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md
|
|
135
135
|
'jsx-a11y/media-has-caption': [
|
|
136
136
|
'error',
|
|
137
137
|
{
|
|
@@ -142,19 +142,19 @@ export default {
|
|
|
142
142
|
],
|
|
143
143
|
|
|
144
144
|
// require that mouseover/out come with focus/blur, for keyboard-only users
|
|
145
|
-
// https://github.com/
|
|
145
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md
|
|
146
146
|
'jsx-a11y/mouse-events-have-key-events': 'error',
|
|
147
147
|
|
|
148
148
|
// Prevent use of `accessKey`
|
|
149
|
-
// https://github.com/
|
|
149
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md
|
|
150
150
|
'jsx-a11y/no-access-key': 'error',
|
|
151
151
|
|
|
152
152
|
// prohibit autoFocus prop
|
|
153
|
-
// https://github.com/
|
|
153
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md
|
|
154
154
|
'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }],
|
|
155
155
|
|
|
156
156
|
// prevent distracting elements, like <marquee> and <blink>
|
|
157
|
-
// https://github.com/
|
|
157
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md
|
|
158
158
|
'jsx-a11y/no-distracting-elements': [
|
|
159
159
|
'error',
|
|
160
160
|
{
|
|
@@ -163,7 +163,7 @@ export default {
|
|
|
163
163
|
],
|
|
164
164
|
|
|
165
165
|
// WAI-ARIA roles should not be used to convert an interactive element to non-interactive
|
|
166
|
-
// https://github.com/
|
|
166
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md
|
|
167
167
|
'jsx-a11y/no-interactive-element-to-noninteractive-role': [
|
|
168
168
|
'error',
|
|
169
169
|
{
|
|
@@ -172,7 +172,7 @@ export default {
|
|
|
172
172
|
],
|
|
173
173
|
|
|
174
174
|
// A non-interactive element does not support event handlers (mouse and key handlers)
|
|
175
|
-
// https://github.com/
|
|
175
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md
|
|
176
176
|
'jsx-a11y/no-noninteractive-element-interactions': [
|
|
177
177
|
'error',
|
|
178
178
|
{
|
|
@@ -181,7 +181,7 @@ export default {
|
|
|
181
181
|
],
|
|
182
182
|
|
|
183
183
|
// WAI-ARIA roles should not be used to convert a non-interactive element to interactive
|
|
184
|
-
// https://github.com/
|
|
184
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md
|
|
185
185
|
'jsx-a11y/no-noninteractive-element-to-interactive-role': [
|
|
186
186
|
'error',
|
|
187
187
|
{
|
|
@@ -194,7 +194,7 @@ export default {
|
|
|
194
194
|
],
|
|
195
195
|
|
|
196
196
|
// Tab key navigation should be limited to elements on the page that can be interacted with.
|
|
197
|
-
// https://github.com/
|
|
197
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md
|
|
198
198
|
'jsx-a11y/no-noninteractive-tabindex': [
|
|
199
199
|
'error',
|
|
200
200
|
{
|
|
@@ -204,18 +204,18 @@ export default {
|
|
|
204
204
|
],
|
|
205
205
|
|
|
206
206
|
// require onBlur instead of onChange
|
|
207
|
-
// https://github.com/
|
|
207
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md
|
|
208
208
|
// decision: This rule is deprecated. This rule is based on reports of behavior of old
|
|
209
209
|
// browsers (eg. IE 10 and below). In the meantime, this behavior has been corrected,
|
|
210
210
|
// both in newer versions of browsers as well as in the DOM spec.
|
|
211
211
|
// 'jsx-a11y/no-onchange': 'off',
|
|
212
212
|
|
|
213
213
|
// ensure HTML elements do not specify redundant ARIA roles
|
|
214
|
-
// https://github.com/
|
|
214
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md
|
|
215
215
|
'jsx-a11y/no-redundant-roles': 'error',
|
|
216
216
|
|
|
217
217
|
// Enforce that DOM elements without semantic behavior not have interaction handlers
|
|
218
|
-
// https://github.com/
|
|
218
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
|
|
219
219
|
'jsx-a11y/no-static-element-interactions': [
|
|
220
220
|
'error',
|
|
221
221
|
{
|
|
@@ -225,20 +225,20 @@ export default {
|
|
|
225
225
|
|
|
226
226
|
// Enforce that elements with ARIA roles must have all required attributes
|
|
227
227
|
// for that role.
|
|
228
|
-
// https://github.com/
|
|
228
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md
|
|
229
229
|
'jsx-a11y/role-has-required-aria-props': 'error',
|
|
230
230
|
|
|
231
231
|
// Enforce that elements with explicit or implicit roles defined contain
|
|
232
232
|
// only aria-* properties supported by that role.
|
|
233
|
-
// https://github.com/
|
|
233
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md
|
|
234
234
|
'jsx-a11y/role-supports-aria-props': 'error',
|
|
235
235
|
|
|
236
236
|
// only allow <th> to have the "scope" attr
|
|
237
|
-
// https://github.com/
|
|
237
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md
|
|
238
238
|
'jsx-a11y/scope': 'error',
|
|
239
239
|
|
|
240
240
|
// Enforce tabIndex value is not greater than zero.
|
|
241
|
-
// https://github.com/
|
|
241
|
+
// https://github.com/infofarmer/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md
|
|
242
242
|
'jsx-a11y/tabindex-no-positive': 'error',
|
|
243
243
|
|
|
244
244
|
// Enforce <a> text to not exactly match "click here", "here", "link", or "a link"
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
// plugin does not provide definitions
|
|
6
|
-
'styled-components-a11y/lang': 'error',
|
|
7
6
|
'styled-components-a11y/alt-text': 'error',
|
|
8
7
|
'styled-components-a11y/anchor-has-content': 'error',
|
|
9
8
|
'styled-components-a11y/anchor-is-valid': 'error',
|
|
@@ -76,4 +75,6 @@ export default {
|
|
|
76
75
|
'styled-components-a11y/role-supports-aria-props': 'error',
|
|
77
76
|
'styled-components-a11y/scope': 'error',
|
|
78
77
|
'styled-components-a11y/tabindex-no-positive': 'error',
|
|
78
|
+
// disabled because there appears to be an eslint bug with this rule
|
|
79
|
+
'styled-components-a11y/lang': 'off',
|
|
79
80
|
};
|
package/src/rules/typescript.mjs
CHANGED
|
@@ -712,5 +712,7 @@ export default {
|
|
|
712
712
|
|
|
713
713
|
// Disallow default values that will never be used
|
|
714
714
|
// https://typescript-eslint.io/rules/no-useless-default-assignment/
|
|
715
|
-
|
|
715
|
+
// decision: temporarily disabled because of bug
|
|
716
|
+
// see: https://github.com/typescript-eslint/typescript-eslint/issues/11849
|
|
717
|
+
'@typescript-eslint/no-useless-default-assignment': 'off',
|
|
716
718
|
};
|