@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.
Files changed (35) hide show
  1. package/configs/javascript.mjs +13 -0
  2. package/configs/node.mjs +8 -0
  3. package/configs/playwright.mjs +7 -0
  4. package/configs/react.mjs +11 -0
  5. package/configs/storybook.mjs +7 -0
  6. package/configs/styled-components.mjs +7 -0
  7. package/configs/testing-library.mjs +7 -0
  8. package/configs/typescript.mjs +20 -0
  9. package/configs/vitest.mjs +8 -0
  10. package/index.mjs +24 -0
  11. package/package.json +10 -16
  12. package/rules/{base.jsonc → base.mjs} +179 -184
  13. package/rules/{import.jsonc → import.mjs} +30 -32
  14. package/rules/{node.jsonc → node.mjs} +37 -39
  15. package/rules/{playwright.jsonc → playwright.mjs} +52 -54
  16. package/rules/{promise.jsonc → promise.mjs} +20 -22
  17. package/rules/{react-a11y.jsonc → react-a11y.mjs} +48 -50
  18. package/rules/{react.jsonc → react.mjs} +55 -57
  19. package/rules/{storybook.jsonc → storybook.mjs} +20 -22
  20. package/rules/styled-components.mjs +151 -0
  21. package/rules/{testing-library.jsonc → testing-library.mjs} +48 -50
  22. package/rules/{typescript.jsonc → typescript.mjs} +134 -136
  23. package/rules/{vitest.jsonc → vitest.mjs} +87 -89
  24. package/configs/javascript.jsonc +0 -4
  25. package/configs/node.jsonc +0 -4
  26. package/configs/playwright.jsonc +0 -4
  27. package/configs/react.jsonc +0 -4
  28. package/configs/storybook.jsonc +0 -4
  29. package/configs/styled-components.jsonc +0 -4
  30. package/configs/testing-library.jsonc +0 -4
  31. package/configs/typescript.jsonc +0 -4
  32. package/configs/vitest.jsonc +0 -4
  33. package/jsoncLoader.d.mts +0 -10
  34. package/jsoncLoader.mjs +0 -27
  35. package/rules/styled-components.jsonc +0 -153
@@ -1,70 +1,68 @@
1
- {
2
- "$schema": "../node_modules/oxlint/configuration_schema.json",
3
- "plugins": ["promise"],
4
- "categories": {},
5
- "rules": {
1
+ export const promiseRules = {
2
+ plugins: ['promise'],
3
+ rules: {
6
4
  // Enforces the use of catch() on un-returned promises
7
5
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/catch-or-return.md
8
- "promise/catch-or-return": "error",
6
+ 'promise/catch-or-return': 'error',
9
7
 
10
8
  // Avoid wrapping values in Promise.resolve or Promise.reject when not needed
11
9
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-return-wrap.md
12
- "promise/no-return-wrap": "error",
10
+ 'promise/no-return-wrap': 'error',
13
11
 
14
12
  // Enforce consistent param names and ordering when creating new promises
15
13
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/param-names.md
16
- "promise/param-names": "error",
14
+ 'promise/param-names': 'error',
17
15
 
18
16
  // Return inside each then() to create readable and reusable Promise chains
19
17
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/always-return.md
20
- "promise/always-return": "error",
18
+ 'promise/always-return': 'error',
21
19
 
22
20
  // Avoid nested then() or catch() statements
23
21
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-nesting.md
24
- "promise/no-nesting": "error",
22
+ 'promise/no-nesting': 'error',
25
23
 
26
24
  // Avoid using promises inside of callbacks
27
25
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-promise-in-callback.md
28
- "promise/no-promise-in-callback": "error",
26
+ 'promise/no-promise-in-callback': 'error',
29
27
 
30
28
  // Avoid calling cb() inside of a then()
31
29
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-callback-in-promise.md
32
- "promise/no-callback-in-promise": "error",
30
+ 'promise/no-callback-in-promise': 'error',
33
31
 
34
32
  // Avoid creating new promises outside of utility libs
35
33
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/avoid-new.md
36
- "promise/avoid-new": "error",
34
+ 'promise/avoid-new': 'error',
37
35
 
38
36
  // Avoid calling new on a Promise static method
39
37
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-new-statics.md
40
- "promise/no-new-statics": "error",
38
+ 'promise/no-new-statics': 'error',
41
39
 
42
40
  // Disallow return statements in finally()
43
41
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-return-in-finally.md
44
- "promise/no-return-in-finally": "error",
42
+ 'promise/no-return-in-finally': 'error',
45
43
 
46
44
  // Ensures the proper number of arguments are passed to Promise functions
47
45
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/valid-params.md
48
- "promise/valid-params": "error",
46
+ 'promise/valid-params': 'error',
49
47
 
50
48
  // Disallow creating new promises with paths that resolve multiple times
51
49
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-multiple-resolved.md
52
- "promise/no-multiple-resolved": "error",
50
+ 'promise/no-multiple-resolved': 'error',
53
51
 
54
52
  // Prefer catch to then(a, b)/then(null, b) for handling errors
55
53
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/prefer-catch.md
56
- "promise/prefer-catch": "error",
54
+ 'promise/prefer-catch': 'error',
57
55
 
58
56
  // Prefer await to then()/catch()/finally() for reading Promise values
59
57
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/prefer-await-to-then.md
60
- "promise/prefer-await-to-then": "off",
58
+ 'promise/prefer-await-to-then': 'off',
61
59
 
62
60
  // Prefer async/await to the callback pattern
63
61
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/prefer-await-to-callbacks.md
64
- "promise/prefer-await-to-callbacks": "off",
62
+ 'promise/prefer-await-to-callbacks': 'off',
65
63
 
66
64
  // Disallow use of non-standard Promise static methods
67
65
  // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/spec-only.md
68
- "promise/spec-only": "error",
66
+ 'promise/spec-only': 'error',
69
67
  },
70
- }
68
+ };
@@ -1,153 +1,151 @@
1
- {
2
- "$schema": "../node_modules/oxlint/configuration_schema.json",
3
- "plugins": ["jsx-a11y"],
4
- "categories": {},
5
- "rules": {
1
+ export const reactA11yRules = {
2
+ plugins: ['jsx-a11y'],
3
+ rules: {
6
4
  // Enforce that all elements that require alternative text have meaningful information
7
5
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/alt-text.md
8
- "jsx_a11y/alt-text": "error",
6
+ 'jsx_a11y/alt-text': 'error',
9
7
 
10
8
  // Enforce that anchors have content
11
9
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-has-content.md
12
- "jsx_a11y/anchor-has-content": "error",
10
+ 'jsx_a11y/anchor-has-content': 'error',
13
11
 
14
12
  // Enforce all anchors are valid, navigable elements
15
13
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
16
- "jsx_a11y/anchor-is-valid": [
17
- "error",
14
+ 'jsx_a11y/anchor-is-valid': [
15
+ 'error',
18
16
  {
19
- "components": ["Link"],
20
- "specialLink": ["to"],
21
- "aspects": ["noHref", "invalidHref", "preferButton"],
17
+ components: ['Link'],
18
+ specialLink: ['to'],
19
+ aspects: ['noHref', 'invalidHref', 'preferButton'],
22
20
  },
23
21
  ],
24
22
 
25
23
  // Enforce that elements with aria-activedescendant have tabindex
26
24
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-activedescendant-has-tabindex.md
27
- "jsx_a11y/aria-activedescendant-has-tabindex": "error",
25
+ 'jsx_a11y/aria-activedescendant-has-tabindex': 'error',
28
26
 
29
27
  // Enforce that elements have valid aria-* props
30
28
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-props.md
31
- "jsx_a11y/aria-props": "error",
29
+ 'jsx_a11y/aria-props': 'error',
32
30
 
33
31
  // Enforce that ARIA state and property values are valid
34
32
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-proptypes.md
35
- "jsx_a11y/aria-proptypes": "error",
33
+ 'jsx_a11y/aria-proptypes': 'error',
36
34
 
37
35
  // Enforce that elements with ARIA roles have all required attributes for that role
38
36
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/role-has-required-aria-props.md
39
- "jsx_a11y/role-has-required-aria-props": "error",
37
+ 'jsx_a11y/role-has-required-aria-props': 'error',
40
38
 
41
39
  // Enforce that elements with explicit or implicit roles defined contain only aria-* properties supported by that role
42
40
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/role-supports-aria-props.md
43
- "jsx_a11y/role-supports-aria-props": "error",
41
+ 'jsx_a11y/role-supports-aria-props': 'error',
44
42
 
45
43
  // Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role
46
44
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-role.md
47
- "jsx_a11y/aria-role": "error",
45
+ 'jsx_a11y/aria-role': 'error',
48
46
 
49
47
  // Enforce that certain elements don't have ARIA roles, states, or properties
50
48
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-unsupported-elements.md
51
- "jsx_a11y/aria-unsupported-elements": "error",
49
+ 'jsx_a11y/aria-unsupported-elements': 'error',
52
50
 
53
51
  // Enforce that autocomplete attribute is correct
54
52
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/autocomplete-valid.md
55
- "jsx_a11y/autocomplete-valid": "off",
53
+ 'jsx_a11y/autocomplete-valid': 'off',
56
54
 
57
55
  // Enforce a clickable non-interactive element has at least one keyboard event listener
58
56
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/click-events-have-key-events.md
59
- "jsx_a11y/click-events-have-key-events": "error",
57
+ 'jsx_a11y/click-events-have-key-events': 'error',
60
58
 
61
59
  // Enforce heading elements have content
62
60
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/heading-has-content.md
63
- "jsx_a11y/heading-has-content": ["error", { "components": [""] }],
61
+ 'jsx_a11y/heading-has-content': ['error', { components: [''] }],
64
62
 
65
63
  // Enforce <html> element has lang prop
66
64
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/html-has-lang.md
67
- "jsx_a11y/html-has-lang": "error",
65
+ 'jsx_a11y/html-has-lang': 'error',
68
66
 
69
67
  // Enforce iframe elements have a title attribute
70
68
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/iframe-has-title.md
71
- "jsx_a11y/iframe-has-title": "error",
69
+ 'jsx_a11y/iframe-has-title': 'error',
72
70
 
73
71
  // Enforce <img> alt prop does not contain the word "image", "picture", or "photo"
74
72
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/img-redundant-alt.md
75
- "jsx_a11y/img-redundant-alt": "error",
73
+ 'jsx_a11y/img-redundant-alt': 'error',
76
74
 
77
75
  // Enforce that a label tag has a text label and an associated control
78
76
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/label-has-associated-control.md
79
- "jsx_a11y/label-has-associated-control": [
80
- "error",
77
+ 'jsx_a11y/label-has-associated-control': [
78
+ 'error',
81
79
  {
82
- "labelComponents": [],
83
- "labelAttributes": [],
84
- "controlComponents": [],
85
- "assert": "both",
86
- "depth": 25,
80
+ labelComponents: [],
81
+ labelAttributes: [],
82
+ controlComponents: [],
83
+ assert: 'both',
84
+ depth: 25,
87
85
  },
88
86
  ],
89
87
 
90
88
  // Enforce lang attribute has a valid value
91
89
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/lang.md
92
- "jsx_a11y/lang": "error",
90
+ 'jsx_a11y/lang': 'error',
93
91
 
94
92
  // Enforce that media elements have captions
95
93
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/media-has-caption.md
96
- "jsx_a11y/media-has-caption": "error",
94
+ 'jsx_a11y/media-has-caption': 'error',
97
95
 
98
96
  // Enforce that onMouseOver/onMouseOut are accompanied by onFocus/onBlur
99
97
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/mouse-events-have-key-events.md
100
- "jsx_a11y/mouse-events-have-key-events": "error",
98
+ 'jsx_a11y/mouse-events-have-key-events': 'error',
101
99
 
102
100
  // Enforce that the accessKey prop is not used on any element
103
101
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-access-key.md
104
- "jsx_a11y/no-access-key": "error",
102
+ 'jsx_a11y/no-access-key': 'error',
105
103
 
106
104
  // Enforce autoFocus prop is not used
107
105
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-autofocus.md
108
- "jsx_a11y/no-autofocus": ["error", { "ignoreNonDOM": true }],
106
+ 'jsx_a11y/no-autofocus': ['error', { ignoreNonDOM: true }],
109
107
 
110
108
  // Enforce distracting elements are not used
111
109
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-distracting-elements.md
112
- "jsx_a11y/no-distracting-elements": "error",
110
+ 'jsx_a11y/no-distracting-elements': 'error',
113
111
 
114
112
  // Enforce tabIndex value is not greater than zero
115
113
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/tabindex-no-positive.md
116
- "jsx_a11y/tabindex-no-positive": "error",
114
+ 'jsx_a11y/tabindex-no-positive': 'error',
117
115
 
118
116
  // Ensure interactive elements are not assigned non-interactive roles
119
117
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-noninteractive-tabindex.md
120
- "jsx_a11y/no-noninteractive-tabindex": [
121
- "error",
118
+ 'jsx_a11y/no-noninteractive-tabindex': [
119
+ 'error',
122
120
  {
123
- "tags": [],
124
- "roles": ["tabpanel"],
121
+ tags: [],
122
+ roles: ['tabpanel'],
125
123
  },
126
124
  ],
127
125
 
128
126
  // Enforce explicit role is not redundant with implicit role of the element
129
127
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-redundant-roles.md
130
- "jsx_a11y/no-redundant-roles": "error",
128
+ 'jsx_a11y/no-redundant-roles': 'error',
131
129
 
132
130
  // Enforce that non-interactive, visible elements with click handlers use the role attribute
133
131
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-static-element-interactions.md
134
- "jsx_a11y/no-static-element-interactions": "error",
132
+ 'jsx_a11y/no-static-element-interactions': 'error',
135
133
 
136
134
  // Enforce scope prop is only used on <th> elements
137
135
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/scope.md
138
- "jsx_a11y/scope": "error",
136
+ 'jsx_a11y/scope': 'error',
139
137
 
140
138
  // Enforce that anchor elements have non-ambiguous text content
141
139
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-ambiguous-text.md
142
- "jsx_a11y/anchor-ambiguous-text": "error",
140
+ 'jsx_a11y/anchor-ambiguous-text': 'error',
143
141
 
144
142
  // Enforce that aria-hidden="true" is not set on focusable elements
145
143
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-aria-hidden-on-focusable.md
146
- "jsx_a11y/no-aria-hidden-on-focusable": "error",
144
+ 'jsx_a11y/no-aria-hidden-on-focusable': 'error',
147
145
 
148
146
  // Prefer semantic HTML elements over role attributes
149
147
  // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/prefer-tag-over-role.md
150
148
  // decision: left to implementer
151
- "jsx_a11y/prefer-tag-over-role": "off",
149
+ 'jsx_a11y/prefer-tag-over-role': 'off',
152
150
  },
153
- }
151
+ };
@@ -1,238 +1,236 @@
1
- {
2
- "$schema": "../node_modules/oxlint/configuration_schema.json",
3
- "plugins": ["react"],
4
- "categories": {},
5
- "rules": {
1
+ export const reactRules = {
2
+ plugins: ['react'],
3
+ rules: {
6
4
  // -- React Core --
7
5
 
8
6
  // Enforce that button elements have an explicit type attribute
9
7
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
10
- "react/button-has-type": "error",
8
+ 'react/button-has-type': 'error',
11
9
 
12
10
  // Enforce boolean attributes notation in JSX (require explicit ={true})
13
11
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value
14
- "react/jsx-boolean-value": ["error", "always"],
12
+ 'react/jsx-boolean-value': ['error', 'always'],
15
13
 
16
14
  // Enforce curly braces or disallow unnecessary curly braces in JSX props and children
17
15
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
18
16
  // decision: stylistic choice best left for formatter
19
- "react/jsx-curly-brace-presence": "off",
17
+ 'react/jsx-curly-brace-presence': 'off',
20
18
 
21
19
  // Enforce shorthand or standard form for React fragments
22
20
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
23
- "react/jsx-fragments": "error",
21
+ 'react/jsx-fragments': 'error',
24
22
 
25
23
  // Enforce missing key props in iterators/collection literals
26
24
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
27
- "react/jsx-key": "error",
25
+ 'react/jsx-key': 'error',
28
26
 
29
27
  // Enforce a maximum depth that JSX can be nested
30
28
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md
31
29
  // decision: not useful enough to justify the performance cost
32
- "react/jsx-max-depth": "off",
30
+ 'react/jsx-max-depth': 'off',
33
31
 
34
32
  // Disallow comments from being inserted as text nodes
35
33
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
36
- "react/jsx-no-comment-textnodes": "error",
34
+ 'react/jsx-no-comment-textnodes': 'error',
37
35
 
38
36
  // Disallow JSX context values from taking values that will cause needless rerenders
39
37
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md
40
- "react/jsx-no-constructed-context-values": "error",
38
+ 'react/jsx-no-constructed-context-values': 'error',
41
39
 
42
40
  // Disallow duplicate properties in JSX
43
41
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
44
42
  // decision: stylistic choice best left for formatter
45
- "react/jsx-no-duplicate-props": "off",
43
+ 'react/jsx-no-duplicate-props': 'off',
46
44
 
47
45
  // Disallow javascript: URLs
48
46
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
49
- "react/jsx-no-script-url": "error",
47
+ 'react/jsx-no-script-url': 'error',
50
48
 
51
49
  // Disallow target="_blank" attribute without rel="noreferrer"
52
50
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
53
- "react/jsx-no-target-blank": "error",
51
+ 'react/jsx-no-target-blank': 'error',
54
52
 
55
53
  // Disallow undeclared variables in JSX
56
54
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
57
55
  // decision: stylistic choice best left for formatter
58
- "react/jsx-no-undef": "off",
56
+ 'react/jsx-no-undef': 'off',
59
57
 
60
58
  // Disallow unnecessary fragments
61
59
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
62
60
  // decision: disabled — oxlint's implementation differs from @eslint-react/no-useless-fragment
63
61
  // and produces false positives on valid patterns
64
- "react/jsx-no-useless-fragment": "off",
62
+ 'react/jsx-no-useless-fragment': 'off',
65
63
 
66
64
  // Enforce PascalCase for user-defined JSX components
67
65
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
68
66
  // decision: stylistic choice best left for formatter
69
- "react/jsx-pascal-case": "off",
67
+ 'react/jsx-pascal-case': 'off',
70
68
 
71
69
  // Disallow spreading props on multiple JSX elements (and merging objects)
72
70
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md
73
71
  // decision: stylistic choice best left for formatter
74
- "react/jsx-props-no-spread-multi": "off",
72
+ 'react/jsx-props-no-spread-multi': 'off',
75
73
 
76
74
  // Disallow JSX prop spreading
77
75
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
78
76
  // decision: this is a decision best left to the implementer
79
- "react/jsx-props-no-spreading": "off",
77
+ 'react/jsx-props-no-spreading': 'off',
80
78
 
81
79
  // Disallow Array.prototype.map() key from being an array index
82
80
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
83
- "react/no-array-index-key": "error",
81
+ 'react/no-array-index-key': 'error',
84
82
 
85
83
  // Disallow passing of children as props
86
84
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
87
- "react/no-children-prop": "error",
85
+ 'react/no-children-prop': 'error',
88
86
 
89
87
  // Disallow usage of dangerous JSX properties
90
88
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md
91
- "react/no-danger": "error",
89
+ 'react/no-danger': 'error',
92
90
 
93
91
  // Report when a DOM element is using both children and dangerouslySetInnerHTML
94
92
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md
95
- "react/no-danger-with-children": "error",
93
+ 'react/no-danger-with-children': 'error',
96
94
 
97
95
  // Disallow direct mutation of this.state
98
96
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
99
- "react/no-direct-mutation-state": "error",
97
+ 'react/no-direct-mutation-state': 'error',
100
98
 
101
99
  // Disallow usage of findDOMNode
102
100
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
103
- "react/no-find-dom-node": "error",
101
+ 'react/no-find-dom-node': 'error',
104
102
 
105
103
  // Disallow usage of isMounted
106
104
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
107
105
  // decision: stylistic choice best left for formatter
108
- "react/no-is-mounted": "off",
106
+ 'react/no-is-mounted': 'off',
109
107
 
110
108
  // Disallow defining multiple components in a single file (allow colocated stateless helpers)
111
109
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
112
110
  // decision: stylistic choice best left for formatter
113
- "react/no-multi-comp": "off",
111
+ 'react/no-multi-comp': 'off',
114
112
 
115
113
  // Disallow usage of the return value of ReactDOM.render
116
114
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
117
- "react/no-render-return-value": "error",
115
+ 'react/no-render-return-value': 'error',
118
116
 
119
117
  // Disallow usage of setState
120
118
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-set-state.md
121
119
  // decision: stylistic choice best left for formatter
122
- "react/no-set-state": "off",
120
+ 'react/no-set-state': 'off',
123
121
 
124
122
  // Disallow using string references
125
123
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
126
124
  // decision: stylistic choice best left for formatter
127
- "react/no-string-refs": "off",
125
+ 'react/no-string-refs': 'off',
128
126
 
129
127
  // Disallow this from being used in stateless functional components
130
128
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md
131
129
  // decision: stylistic choice best left for formatter
132
- "react/no-this-in-sfc": "off",
130
+ 'react/no-this-in-sfc': 'off',
133
131
 
134
132
  // Disallow unescaped HTML entities from appearing in markup
135
133
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
136
134
  // decision: stylistic choice best left for formatter
137
- "react/no-unescaped-entities": "off",
135
+ 'react/no-unescaped-entities': 'off',
138
136
 
139
137
  // Disallow usage of unknown DOM property
140
138
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
141
- "react/no-unknown-property": "error",
139
+ 'react/no-unknown-property': 'error',
142
140
 
143
141
  // Disallow usage of unsafe lifecycle methods
144
142
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md
145
143
  // decision: stylistic choice best left for formatter
146
- "react/no-unsafe": "off",
144
+ 'react/no-unsafe': 'off',
147
145
 
148
146
  // Disallow usage of deprecated methods
149
147
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md
150
- "react/no-redundant-should-component-update": "error",
148
+ 'react/no-redundant-should-component-update': 'error',
151
149
 
152
150
  // Disallow creating unstable components inside components
153
151
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-namespace.md
154
- "react/no-namespace": "error",
152
+ 'react/no-namespace': 'error',
155
153
 
156
154
  // Disallow usage of setState in componentDidMount
157
155
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
158
- "react/no-did-mount-set-state": "error",
156
+ 'react/no-did-mount-set-state': 'error',
159
157
 
160
158
  // Disallow usage of setState in componentWillUpdate
161
159
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md
162
- "react/no-will-update-set-state": "error",
160
+ 'react/no-will-update-set-state': 'error',
163
161
 
164
162
  // Disallow usage of React.Children APIs
165
163
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-react-children.md
166
164
  // decision: stylistic choice best left for formatter
167
- "react/no-react-children": "off",
165
+ 'react/no-react-children': 'off',
168
166
 
169
167
  // Disallow usage of cloneElement
170
168
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-clone-element.md
171
- "react/no-clone-element": "error",
169
+ 'react/no-clone-element': 'error',
172
170
 
173
171
  // Enforce ES5 or ES6 class for React Components
174
172
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
175
173
  // decision: stylistic choice best left for formatter
176
- "react/prefer-es6-class": "off",
174
+ 'react/prefer-es6-class': 'off',
177
175
 
178
176
  // Enforce that components that only export from react can only export components
179
177
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/only-export-components.md
180
178
  // decision: stylistic choice best left for formatter
181
- "react/only-export-components": "off",
179
+ 'react/only-export-components': 'off',
182
180
 
183
181
  // Prevent missing displayName in a React component definition
184
182
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
185
183
  // decision: stylistic choice best left for formatter (equivalent @eslint-react/no-missing-component-display-name is "off")
186
- "react/display-name": "off",
184
+ 'react/display-name': 'off',
187
185
 
188
186
  // Enforce a specific function type for function components
189
187
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forward-ref-uses-ref.md
190
188
  // decision: stylistic choice best left for formatter
191
- "react/forward-ref-uses-ref": "off",
189
+ 'react/forward-ref-uses-ref': 'off',
192
190
 
193
191
  // Enforce sandbox attribute on iframe elements
194
192
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md
195
- "react/iframe-missing-sandbox": "error",
193
+ 'react/iframe-missing-sandbox': 'error',
196
194
 
197
195
  // Enforce checked/onChange or readonly for checkboxes
198
196
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
199
197
  // decision: stylistic choice best left for formatter
200
- "react/checked-requires-onchange-or-readonly": "off",
198
+ 'react/checked-requires-onchange-or-readonly': 'off',
201
199
 
202
200
  // Disallow void DOM elements from receiving children
203
201
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
204
- "react/void-dom-elements-no-children": "error",
202
+ 'react/void-dom-elements-no-children': 'error',
205
203
 
206
204
  // Enforce component methods order
207
205
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
208
206
  // decision: stylistic choice best left for formatter
209
- "react/require-render-return": "off",
207
+ 'react/require-render-return': 'off',
210
208
 
211
209
  // Enforce Rules of Hooks
212
210
  // https://reactjs.org/docs/hooks-rules.html
213
- "react/rules-of-hooks": "error",
211
+ 'react/rules-of-hooks': 'error',
214
212
 
215
213
  // Verify the list of the dependencies for Hooks like useEffect and similar
216
214
  // https://github.com/facebook/react/issues/14920
217
- "react/exhaustive-deps": "error",
215
+ 'react/exhaustive-deps': 'error',
218
216
 
219
217
  // Enforce JSX filename extension (allow .jsx and .tsx)
220
218
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
221
219
  // decision: stylistic choice best left for formatter
222
- "react/jsx-filename-extension": "off",
220
+ 'react/jsx-filename-extension': 'off',
223
221
 
224
222
  // Enforce self-closing tags for components without children
225
223
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
226
224
  // decision: stylistic choice best left for formatter
227
- "react/self-closing-comp": "off",
225
+ 'react/self-closing-comp': 'off',
228
226
 
229
227
  // Enforce style prop value is an object
230
228
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
231
- "react/style-prop-object": "error",
229
+ 'react/style-prop-object': 'error',
232
230
 
233
231
  // Enforce event handler naming conventions in JSX
234
232
  // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
235
233
  // decision: stylistic choice best left for formatter
236
- "react/jsx-handler-names": "off",
234
+ 'react/jsx-handler-names': 'off',
237
235
  },
238
- }
236
+ };