@wistia/oxlint-config 0.2.0 → 0.3.1
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/configs/javascript.mjs +13 -0
- package/configs/node.mjs +8 -0
- package/configs/playwright.mjs +7 -0
- package/configs/react.mjs +11 -0
- package/configs/storybook.mjs +7 -0
- package/configs/styled-components.mjs +7 -0
- package/configs/testing-library.mjs +7 -0
- package/configs/typescript.mjs +20 -0
- package/configs/vitest.mjs +8 -0
- package/index.mjs +24 -0
- package/package.json +10 -16
- package/rules/{base.jsonc → base.mjs} +179 -184
- package/rules/{import.jsonc → import.mjs} +30 -32
- package/rules/{node.jsonc → node.mjs} +37 -39
- package/rules/{playwright.jsonc → playwright.mjs} +52 -54
- package/rules/{promise.jsonc → promise.mjs} +20 -22
- package/rules/{react-a11y.jsonc → react-a11y.mjs} +48 -50
- package/rules/{react.jsonc → react.mjs} +55 -57
- package/rules/{storybook.jsonc → storybook.mjs} +20 -22
- package/rules/styled-components.mjs +151 -0
- package/rules/{testing-library.jsonc → testing-library.mjs} +48 -50
- package/rules/{typescript.jsonc → typescript.mjs} +134 -136
- package/rules/{vitest.jsonc → vitest.mjs} +87 -89
- package/configs/javascript.jsonc +0 -4
- package/configs/node.jsonc +0 -4
- package/configs/playwright.jsonc +0 -4
- package/configs/react.jsonc +0 -4
- package/configs/storybook.jsonc +0 -4
- package/configs/styled-components.jsonc +0 -4
- package/configs/testing-library.jsonc +0 -4
- package/configs/typescript.jsonc +0 -4
- package/configs/vitest.jsonc +0 -4
- package/jsoncLoader.d.mts +0 -10
- package/jsoncLoader.mjs +0 -27
- package/rules/styled-components.jsonc +0 -153
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// All styled-components-a11y rules loaded via jsPlugins (no native oxlint support).
|
|
3
|
-
"$schema": "../node_modules/oxlint/configuration_schema.json",
|
|
4
|
-
"jsPlugins": ["eslint-plugin-styled-components-a11y"],
|
|
5
|
-
"categories": {},
|
|
6
|
-
"rules": {
|
|
7
|
-
// Enforce that all elements that require alternative text have meaningful information
|
|
8
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/alt-text.md
|
|
9
|
-
"eslint-plugin-styled-components-a11y/alt-text": "error",
|
|
10
|
-
|
|
11
|
-
// Enforce that anchors have content
|
|
12
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/anchor-has-content.md
|
|
13
|
-
"eslint-plugin-styled-components-a11y/anchor-has-content": "error",
|
|
14
|
-
|
|
15
|
-
// Enforce all anchors are valid, navigable elements
|
|
16
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/anchor-is-valid.md
|
|
17
|
-
"eslint-plugin-styled-components-a11y/anchor-is-valid": "error",
|
|
18
|
-
|
|
19
|
-
// Enforce that elements with aria-activedescendant have tabindex
|
|
20
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md
|
|
21
|
-
"eslint-plugin-styled-components-a11y/aria-activedescendant-has-tabindex": "error",
|
|
22
|
-
|
|
23
|
-
// Enforce that elements have valid aria-* props
|
|
24
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/aria-props.md
|
|
25
|
-
"eslint-plugin-styled-components-a11y/aria-props": "error",
|
|
26
|
-
|
|
27
|
-
// Enforce that ARIA state and property values are valid
|
|
28
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/aria-proptypes.md
|
|
29
|
-
"eslint-plugin-styled-components-a11y/aria-proptypes": "error",
|
|
30
|
-
|
|
31
|
-
// Enforce that elements with ARIA roles have all required attributes for that role
|
|
32
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/aria-role.md
|
|
33
|
-
"eslint-plugin-styled-components-a11y/aria-role": "error",
|
|
34
|
-
|
|
35
|
-
// Enforce that certain elements don't have ARIA roles, states, or properties
|
|
36
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/aria-unsupported-elements.md
|
|
37
|
-
"eslint-plugin-styled-components-a11y/aria-unsupported-elements": "error",
|
|
38
|
-
|
|
39
|
-
// Enforce that autocomplete attribute is correct
|
|
40
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/autocomplete-valid.md
|
|
41
|
-
"eslint-plugin-styled-components-a11y/autocomplete-valid": "error",
|
|
42
|
-
|
|
43
|
-
// Enforce click events have key events
|
|
44
|
-
// https://github.com/brendanmorrell/eslint-plugin-styled-components-a11y/blob/master/docs/rules/click-events-have-key-events.md
|
|
45
|
-
"eslint-plugin-styled-components-a11y/click-events-have-key-events": "error",
|
|
46
|
-
|
|
47
|
-
// Enforce a label tag has a text label and an associated control
|
|
48
|
-
"eslint-plugin-styled-components-a11y/control-has-associated-label": [
|
|
49
|
-
"error",
|
|
50
|
-
{
|
|
51
|
-
"ignoreElements": ["audio", "canvas", "embed", "input", "textarea", "tr", "video"],
|
|
52
|
-
"ignoreRoles": [
|
|
53
|
-
"grid",
|
|
54
|
-
"listbox",
|
|
55
|
-
"menu",
|
|
56
|
-
"menubar",
|
|
57
|
-
"radiogroup",
|
|
58
|
-
"row",
|
|
59
|
-
"tablist",
|
|
60
|
-
"toolbar",
|
|
61
|
-
"tree",
|
|
62
|
-
"treegrid",
|
|
63
|
-
],
|
|
64
|
-
"includeRoles": ["alert", "dialog"],
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
|
|
68
|
-
// Enforce heading elements have content
|
|
69
|
-
"eslint-plugin-styled-components-a11y/heading-has-content": "error",
|
|
70
|
-
|
|
71
|
-
// Enforce html element has lang prop
|
|
72
|
-
"eslint-plugin-styled-components-a11y/html-has-lang": "error",
|
|
73
|
-
|
|
74
|
-
// Enforce iframe elements have a title attribute
|
|
75
|
-
"eslint-plugin-styled-components-a11y/iframe-has-title": "error",
|
|
76
|
-
|
|
77
|
-
// Enforce img alt prop does not contain the word image, picture, or photo
|
|
78
|
-
"eslint-plugin-styled-components-a11y/img-redundant-alt": "error",
|
|
79
|
-
|
|
80
|
-
// Enforce that interactive elements are focusable
|
|
81
|
-
"eslint-plugin-styled-components-a11y/interactive-supports-focus": [
|
|
82
|
-
"error",
|
|
83
|
-
{
|
|
84
|
-
"tabbable": [
|
|
85
|
-
"button",
|
|
86
|
-
"checkbox",
|
|
87
|
-
"link",
|
|
88
|
-
"progressbar",
|
|
89
|
-
"searchbox",
|
|
90
|
-
"slider",
|
|
91
|
-
"spinbutton",
|
|
92
|
-
"switch",
|
|
93
|
-
"textbox",
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
|
|
98
|
-
// Enforce label-control association
|
|
99
|
-
"eslint-plugin-styled-components-a11y/label-has-associated-control": "error",
|
|
100
|
-
|
|
101
|
-
// Enforce that media elements have captions
|
|
102
|
-
"eslint-plugin-styled-components-a11y/media-has-caption": "error",
|
|
103
|
-
|
|
104
|
-
// Enforce onMouseOver/onMouseOut are accompanied by onFocus/onBlur
|
|
105
|
-
"eslint-plugin-styled-components-a11y/mouse-events-have-key-events": "error",
|
|
106
|
-
|
|
107
|
-
// Enforce that the accessKey prop is not used
|
|
108
|
-
"eslint-plugin-styled-components-a11y/no-access-key": "error",
|
|
109
|
-
|
|
110
|
-
// Enforce autoFocus prop is not used
|
|
111
|
-
"eslint-plugin-styled-components-a11y/no-autofocus": "error",
|
|
112
|
-
|
|
113
|
-
// Enforce distracting elements are not used
|
|
114
|
-
"eslint-plugin-styled-components-a11y/no-distracting-elements": "error",
|
|
115
|
-
|
|
116
|
-
// Enforce interactive elements not assigned non-interactive roles
|
|
117
|
-
"eslint-plugin-styled-components-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
118
|
-
|
|
119
|
-
// Enforce non-interactive elements do not have interactions
|
|
120
|
-
"eslint-plugin-styled-components-a11y/no-noninteractive-element-interactions": [
|
|
121
|
-
"error",
|
|
122
|
-
{
|
|
123
|
-
"body": ["onError", "onLoad"],
|
|
124
|
-
"iframe": ["onError", "onLoad"],
|
|
125
|
-
"img": ["onError", "onLoad"],
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
|
-
|
|
129
|
-
// Enforce non-interactive elements not assigned interactive roles
|
|
130
|
-
"eslint-plugin-styled-components-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
131
|
-
|
|
132
|
-
// Enforce tabIndex value is not greater than zero
|
|
133
|
-
"eslint-plugin-styled-components-a11y/no-noninteractive-tabindex": "error",
|
|
134
|
-
|
|
135
|
-
// Enforce explicit role is not redundant
|
|
136
|
-
"eslint-plugin-styled-components-a11y/no-redundant-roles": "error",
|
|
137
|
-
|
|
138
|
-
// Enforce non-interactive visible elements with click handlers use the role attribute
|
|
139
|
-
"eslint-plugin-styled-components-a11y/no-static-element-interactions": "error",
|
|
140
|
-
|
|
141
|
-
// Enforce that elements with ARIA roles have all required attributes
|
|
142
|
-
"eslint-plugin-styled-components-a11y/role-has-required-aria-props": "error",
|
|
143
|
-
|
|
144
|
-
// Enforce that elements with roles support all aria-* properties for that role
|
|
145
|
-
"eslint-plugin-styled-components-a11y/role-supports-aria-props": "error",
|
|
146
|
-
|
|
147
|
-
// Enforce scope prop is only used on th elements
|
|
148
|
-
"eslint-plugin-styled-components-a11y/scope": "error",
|
|
149
|
-
|
|
150
|
-
// Enforce tabIndex value is not greater than zero
|
|
151
|
-
"eslint-plugin-styled-components-a11y/tabindex-no-positive": "error",
|
|
152
|
-
},
|
|
153
|
-
}
|