@wistia/oxlint-config 0.0.1 → 0.2.0

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.
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["import"],
4
+ "categories": {},
5
+ "rules": {
6
+ // Ensure named imports coupled with named exports
7
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/named.md
8
+ // note: oxlint import plugin uses "default" and "namespace" for resolution checks
9
+ "import/default": "error",
10
+
11
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/namespace.md
12
+ "import/namespace": "error",
13
+
14
+ // Forbid cyclical dependencies between modules
15
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-cycle.md
16
+ "import/no-cycle": ["error", { "maxDepth": 2 }],
17
+
18
+ // Disallow duplicate imports
19
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
20
+ "import/no-duplicates": "error",
21
+
22
+ // Forbid default exports
23
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-default-export.md
24
+ "import/no-default-export": "error",
25
+
26
+ // Forbid a module from importing itself
27
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-self-import.md
28
+ "import/no-self-import": "error",
29
+
30
+ // Forbid import of modules using absolute paths
31
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md
32
+ "import/no-absolute-path": "error",
33
+
34
+ // Forbid empty named import blocks
35
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-empty-named-blocks.md
36
+ "import/no-empty-named-blocks": "error",
37
+
38
+ // Do not allow a default import name to match a named export
39
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default.md
40
+ "import/no-named-as-default": "error",
41
+
42
+ // Warn on accessing default export property names that are also named exports
43
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-as-default-member.md
44
+ "import/no-named-as-default-member": "error",
45
+
46
+ // Prevent importing the default as if it were named
47
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-named-default.md
48
+ "import/no-named-default": "error",
49
+
50
+ // Forbid mutable exports
51
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-mutable-exports.md
52
+ "import/no-mutable-exports": "error",
53
+
54
+ // Reports if a module's default export is unnamed
55
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-anonymous-default-export.md
56
+ "import/no-anonymous-default-export": [
57
+ "error",
58
+ {
59
+ "allowArray": false,
60
+ "allowArrowFunction": false,
61
+ "allowAnonymousClass": false,
62
+ "allowAnonymousFunction": false,
63
+ "allowCallExpression": true,
64
+ "allowLiteral": false,
65
+ "allowObject": false,
66
+ },
67
+ ],
68
+
69
+ // Disallow non-import statements appearing before import statements
70
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/first.md
71
+ "import/first": "error",
72
+
73
+ // Disallow require()
74
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-commonjs.md
75
+ "import/no-commonjs": "error",
76
+
77
+ // Disallow AMD require/define
78
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-amd.md
79
+ "import/no-amd": "error",
80
+
81
+ // Forbid require() calls with expressions
82
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-dynamic-require.md
83
+ "import/no-dynamic-require": "error",
84
+
85
+ // Forbid Webpack loader syntax in imports
86
+ // https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-webpack-loader-syntax.md
87
+ "import/no-webpack-loader-syntax": "error",
88
+ },
89
+ }
@@ -0,0 +1,133 @@
1
+ {
2
+ // Native oxlint node rules + eslint-plugin-n via jsPlugins for rules
3
+ // without native equivalents.
4
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
5
+ "plugins": ["node"],
6
+ "jsPlugins": [{ "name": "n", "specifier": "eslint-plugin-n" }],
7
+ "categories": {},
8
+ "rules": {
9
+ // -- Native oxlint node rules --
10
+
11
+ // Require error handling in callbacks
12
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/handle-callback-err.md
13
+ "node/handle-callback-err": "error",
14
+
15
+ // Disallow the assignment to exports
16
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-exports-assign.md
17
+ "node/no-exports-assign": "error",
18
+
19
+ // Disallow new operators with calls to require
20
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-new-require.md
21
+ "node/no-new-require": "error",
22
+
23
+ // Disallow string concatenation with __dirname and __filename
24
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
25
+ "node/no-path-concat": "error",
26
+
27
+ // -- eslint-plugin-n rules via jsPlugins --
28
+
29
+ // Disallow deprecated APIs
30
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-deprecated-api.md
31
+ "n/no-deprecated-api": "error",
32
+
33
+ // Disallow bin files that npm ignores
34
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-bin.md
35
+ "n/no-unpublished-bin": "error",
36
+
37
+ // Disallow import declarations which import private modules
38
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-import.md
39
+ "n/no-unpublished-import": "error",
40
+
41
+ // Disallow require() expressions which import private modules
42
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-require.md
43
+ "n/no-unpublished-require": "error",
44
+
45
+ // Disallow unsupported ECMAScript built-ins on the specified version
46
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/es-builtins.md
47
+ "n/no-unsupported-features/es-builtins": "error",
48
+
49
+ // Disallow unsupported ECMAScript syntax on the specified version
50
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/es-syntax.md
51
+ "n/no-unsupported-features/es-syntax": ["error", { "ignores": ["modules"] }],
52
+
53
+ // Disallow unsupported Node.js built-in APIs on the specified version
54
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/node-builtins.md
55
+ "n/no-unsupported-features/node-builtins": "error",
56
+
57
+ // Make process.exit() expressions the same code path as throw
58
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/process-exit-as-throw.md
59
+ "n/process-exit-as-throw": "error",
60
+
61
+ // Disallow top-level await
62
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-top-level-await.md
63
+ "n/no-top-level-await": ["error", { "ignoreBin": true }],
64
+
65
+ // Require return statements after callbacks
66
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/callback-return.md
67
+ "n/callback-return": "error",
68
+
69
+ // Enforce either module.exports or exports
70
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/exports-style.md
71
+ "n/exports-style": "error",
72
+
73
+ // Require require() to be called in the top-level module scope
74
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/global-require.md
75
+ "n/global-require": "error",
76
+
77
+ // Disallow require calls to be mixed with regular variable declarations
78
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-mixed-requires.md
79
+ "n/no-mixed-requires": "error",
80
+
81
+ // Restrict usage of specified node imports
82
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-restricted-import.md
83
+ "n/no-restricted-import": "error",
84
+
85
+ // Restrict usage of specified node requires
86
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-restricted-require.md
87
+ "n/no-restricted-require": "error",
88
+
89
+ // Enforce the use of the global Buffer
90
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/buffer.md
91
+ "n/prefer-global/buffer": "error",
92
+
93
+ // Enforce the use of the global console
94
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/console.md
95
+ "n/prefer-global/console": "error",
96
+
97
+ // Enforce the use of the global process
98
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md
99
+ "n/prefer-global/process": "error",
100
+
101
+ // Enforce the use of the global TextDecoder
102
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-decoder.md
103
+ "n/prefer-global/text-decoder": "error",
104
+
105
+ // Enforce the use of the global TextEncoder
106
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md
107
+ "n/prefer-global/text-encoder": "error",
108
+
109
+ // Enforce the use of the global URLSearchParams
110
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
111
+ "n/prefer-global/url-search-params": "error",
112
+
113
+ // Enforce the use of the global URL
114
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url.md
115
+ "n/prefer-global/url": "error",
116
+
117
+ // Enforce using the promises API of dns
118
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/dns.md
119
+ "n/prefer-promises/dns": "error",
120
+
121
+ // Enforce using the promises API of fs
122
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-promises/fs.md
123
+ "n/prefer-promises/fs": "error",
124
+
125
+ // Require correct usage of hashbang
126
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/hashbang.md
127
+ "n/hashbang": "error",
128
+
129
+ // Enforce using the node: protocol when importing Node.js builtins
130
+ // https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
131
+ "n/prefer-node-protocol": "error",
132
+ },
133
+ }
@@ -0,0 +1,195 @@
1
+ {
2
+ // All playwright rules loaded via jsPlugins (no native oxlint support).
3
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
4
+ "jsPlugins": ["eslint-plugin-playwright"],
5
+ "categories": {},
6
+ "rules": {
7
+ // Disallow focused tests
8
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-focused-test.md
9
+ "eslint-plugin-playwright/no-focused-test": "error",
10
+
11
+ // Enforce having expectation in test body
12
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/expect-expect.md
13
+ "eslint-plugin-playwright/expect-expect": "error",
14
+
15
+ // Enforce awaiting Playwright-specific methods
16
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/missing-playwright-await.md
17
+ "eslint-plugin-playwright/missing-playwright-await": "error",
18
+
19
+ // Enforce maximum depth of nested describe blocks
20
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/max-nested-describe.md
21
+ "eslint-plugin-playwright/max-nested-describe": "error",
22
+
23
+ // Disallow conditional expects
24
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-conditional-expect.md
25
+ "eslint-plugin-playwright/no-conditional-expect": "error",
26
+
27
+ // Disallow conditional tests
28
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-conditional-in-test.md
29
+ "eslint-plugin-playwright/no-conditional-in-test": "error",
30
+
31
+ // Disallow commented out tests
32
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-commented-out-tests.md
33
+ "eslint-plugin-playwright/no-commented-out-tests": "error",
34
+
35
+ // Disallow duplicate hooks
36
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-duplicate-hooks.md
37
+ "eslint-plugin-playwright/no-duplicate-hooks": "error",
38
+
39
+ // Disallow usage of ElementHandle
40
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-element-handle.md
41
+ "eslint-plugin-playwright/no-element-handle": "error",
42
+
43
+ // Disallow usage of page.$eval and page.$$eval
44
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-eval.md
45
+ "eslint-plugin-playwright/no-eval": "error",
46
+
47
+ // Disallow force option usage
48
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-force-option.md
49
+ "eslint-plugin-playwright/no-force-option": "error",
50
+
51
+ // Disallow getByTitle locator
52
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-get-by-title.md
53
+ "eslint-plugin-playwright/no-get-by-title": "error",
54
+
55
+ // Disallow nested steps
56
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-nested-step.md
57
+ "eslint-plugin-playwright/no-nested-step": "error",
58
+
59
+ // Disallow networkidle option
60
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-networkidle.md
61
+ "eslint-plugin-playwright/no-networkidle": "error",
62
+
63
+ // Disallow page.pause()
64
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-page-pause.md
65
+ "eslint-plugin-playwright/no-page-pause": "error",
66
+
67
+ // Disallow raw locators
68
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-raw-locators.md
69
+ "eslint-plugin-playwright/no-raw-locators": "error",
70
+
71
+ // Disallow standalone expects
72
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-standalone-expect.md
73
+ "eslint-plugin-playwright/no-standalone-expect": "error",
74
+
75
+ // Disallow unsafe references in event handlers
76
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-unsafe-references.md
77
+ "eslint-plugin-playwright/no-unsafe-references": "error",
78
+
79
+ // Disallow unused locators
80
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-unused-locators.md
81
+ "eslint-plugin-playwright/no-unused-locators": "error",
82
+
83
+ // Disallow useless awaits
84
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-useless-await.md
85
+ "eslint-plugin-playwright/no-useless-await": "error",
86
+
87
+ // Disallow useless not assertions
88
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-useless-not.md
89
+ "eslint-plugin-playwright/no-useless-not": "error",
90
+
91
+ // Disallow waitForNavigation
92
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-wait-for-navigation.md
93
+ "eslint-plugin-playwright/no-wait-for-navigation": "error",
94
+
95
+ // Disallow waitForSelector
96
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-wait-for-selector.md
97
+ "eslint-plugin-playwright/no-wait-for-selector": "error",
98
+
99
+ // Disallow waitForTimeout
100
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-wait-for-timeout.md
101
+ "eslint-plugin-playwright/no-wait-for-timeout": "error",
102
+
103
+ // Prefer native locators
104
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-native-locators.md
105
+ "eslint-plugin-playwright/prefer-native-locators": "error",
106
+
107
+ // Prefer web-first assertions
108
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-web-first-assertions.md
109
+ "eslint-plugin-playwright/prefer-web-first-assertions": "error",
110
+
111
+ // Require setup and teardown to be within a hook
112
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/require-hook.md
113
+ "eslint-plugin-playwright/require-hook": "error",
114
+
115
+ // Enforce valid describe callback
116
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/valid-describe-callback.md
117
+ "eslint-plugin-playwright/valid-describe-callback": "error",
118
+
119
+ // Enforce valid expect usage
120
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/valid-expect.md
121
+ "eslint-plugin-playwright/valid-expect": "error",
122
+
123
+ // Enforce valid titles
124
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/valid-title.md
125
+ "eslint-plugin-playwright/valid-title": "error",
126
+
127
+ // Enforce maximum expect calls
128
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/max-expects.md
129
+ "eslint-plugin-playwright/max-expects": "error",
130
+
131
+ // Enforce valid expect in promise
132
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/valid-expect-in-promise.md
133
+ "eslint-plugin-playwright/valid-expect-in-promise": "error",
134
+
135
+ // Enforce all tests in a top-level describe
136
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/require-top-level-describe.md
137
+ "eslint-plugin-playwright/require-top-level-describe": "error",
138
+
139
+ // Enforce valid test tags
140
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/valid-test-tags.md
141
+ "eslint-plugin-playwright/valid-test-tags": "error",
142
+
143
+ // Disallow slowed tests
144
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-slowed-test.md
145
+ "eslint-plugin-playwright/no-slowed-test": "error",
146
+
147
+ // Disallow nth methods
148
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-nth-methods.md
149
+ "eslint-plugin-playwright/no-nth-methods": "error",
150
+
151
+ // Prefer comparison matcher
152
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-comparison-matcher.md
153
+ "eslint-plugin-playwright/prefer-comparison-matcher": "error",
154
+
155
+ // Prefer equality matcher
156
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-equality-matcher.md
157
+ "eslint-plugin-playwright/prefer-equality-matcher": "error",
158
+
159
+ // Prefer hooks in order
160
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-hooks-in-order.md
161
+ "eslint-plugin-playwright/prefer-hooks-in-order": "error",
162
+
163
+ // Prefer hooks on top
164
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-hooks-on-top.md
165
+ "eslint-plugin-playwright/prefer-hooks-on-top": "error",
166
+
167
+ // Prefer locator
168
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-locator.md
169
+ "eslint-plugin-playwright/prefer-locator": "error",
170
+
171
+ // Prefer strict equal
172
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-strict-equal.md
173
+ "eslint-plugin-playwright/prefer-strict-equal": "error",
174
+
175
+ // Prefer toBe
176
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-to-be.md
177
+ "eslint-plugin-playwright/prefer-to-be": "error",
178
+
179
+ // Prefer toContain
180
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-to-contain.md
181
+ "eslint-plugin-playwright/prefer-to-contain": "error",
182
+
183
+ // Prefer toHaveCount
184
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-to-have-count.md
185
+ "eslint-plugin-playwright/prefer-to-have-count": "error",
186
+
187
+ // Prefer toHaveLength
188
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/prefer-to-have-length.md
189
+ "eslint-plugin-playwright/prefer-to-have-length": "error",
190
+
191
+ // Require toThrow message
192
+ // https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/require-to-throw-message.md
193
+ "eslint-plugin-playwright/require-to-throw-message": "error",
194
+ },
195
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["promise"],
4
+ "categories": {},
5
+ "rules": {
6
+ // Enforces the use of catch() on un-returned promises
7
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/catch-or-return.md
8
+ "promise/catch-or-return": "error",
9
+
10
+ // Avoid wrapping values in Promise.resolve or Promise.reject when not needed
11
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-return-wrap.md
12
+ "promise/no-return-wrap": "error",
13
+
14
+ // Enforce consistent param names and ordering when creating new promises
15
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/param-names.md
16
+ "promise/param-names": "error",
17
+
18
+ // Return inside each then() to create readable and reusable Promise chains
19
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/always-return.md
20
+ "promise/always-return": "error",
21
+
22
+ // Avoid nested then() or catch() statements
23
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-nesting.md
24
+ "promise/no-nesting": "error",
25
+
26
+ // Avoid using promises inside of callbacks
27
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-promise-in-callback.md
28
+ "promise/no-promise-in-callback": "error",
29
+
30
+ // Avoid calling cb() inside of a then()
31
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-callback-in-promise.md
32
+ "promise/no-callback-in-promise": "error",
33
+
34
+ // Avoid creating new promises outside of utility libs
35
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/avoid-new.md
36
+ "promise/avoid-new": "error",
37
+
38
+ // Avoid calling new on a Promise static method
39
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-new-statics.md
40
+ "promise/no-new-statics": "error",
41
+
42
+ // Disallow return statements in finally()
43
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-return-in-finally.md
44
+ "promise/no-return-in-finally": "error",
45
+
46
+ // Ensures the proper number of arguments are passed to Promise functions
47
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/valid-params.md
48
+ "promise/valid-params": "error",
49
+
50
+ // Disallow creating new promises with paths that resolve multiple times
51
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/no-multiple-resolved.md
52
+ "promise/no-multiple-resolved": "error",
53
+
54
+ // Prefer catch to then(a, b)/then(null, b) for handling errors
55
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/prefer-catch.md
56
+ "promise/prefer-catch": "error",
57
+
58
+ // Prefer await to then()/catch()/finally() for reading Promise values
59
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/prefer-await-to-then.md
60
+ "promise/prefer-await-to-then": "off",
61
+
62
+ // Prefer async/await to the callback pattern
63
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/prefer-await-to-callbacks.md
64
+ "promise/prefer-await-to-callbacks": "off",
65
+
66
+ // Disallow use of non-standard Promise static methods
67
+ // https://github.com/xjamundx/eslint-plugin-promise/blob/development/docs/rules/spec-only.md
68
+ "promise/spec-only": "error",
69
+ },
70
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "../node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["jsx-a11y"],
4
+ "categories": {},
5
+ "rules": {
6
+ // Enforce that all elements that require alternative text have meaningful information
7
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/alt-text.md
8
+ "jsx_a11y/alt-text": "error",
9
+
10
+ // Enforce that anchors have content
11
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-has-content.md
12
+ "jsx_a11y/anchor-has-content": "error",
13
+
14
+ // Enforce all anchors are valid, navigable elements
15
+ // 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",
18
+ {
19
+ "components": ["Link"],
20
+ "specialLink": ["to"],
21
+ "aspects": ["noHref", "invalidHref", "preferButton"],
22
+ },
23
+ ],
24
+
25
+ // Enforce that elements with aria-activedescendant have tabindex
26
+ // 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",
28
+
29
+ // Enforce that elements have valid aria-* props
30
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-props.md
31
+ "jsx_a11y/aria-props": "error",
32
+
33
+ // Enforce that ARIA state and property values are valid
34
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-proptypes.md
35
+ "jsx_a11y/aria-proptypes": "error",
36
+
37
+ // Enforce that elements with ARIA roles have all required attributes for that role
38
+ // 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",
40
+
41
+ // Enforce that elements with explicit or implicit roles defined contain only aria-* properties supported by that role
42
+ // 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",
44
+
45
+ // Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role
46
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-role.md
47
+ "jsx_a11y/aria-role": "error",
48
+
49
+ // Enforce that certain elements don't have ARIA roles, states, or properties
50
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/aria-unsupported-elements.md
51
+ "jsx_a11y/aria-unsupported-elements": "error",
52
+
53
+ // Enforce that autocomplete attribute is correct
54
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/autocomplete-valid.md
55
+ "jsx_a11y/autocomplete-valid": "off",
56
+
57
+ // Enforce a clickable non-interactive element has at least one keyboard event listener
58
+ // 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",
60
+
61
+ // Enforce heading elements have content
62
+ // 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": [""] }],
64
+
65
+ // Enforce <html> element has lang prop
66
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/html-has-lang.md
67
+ "jsx_a11y/html-has-lang": "error",
68
+
69
+ // Enforce iframe elements have a title attribute
70
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/iframe-has-title.md
71
+ "jsx_a11y/iframe-has-title": "error",
72
+
73
+ // Enforce <img> alt prop does not contain the word "image", "picture", or "photo"
74
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/img-redundant-alt.md
75
+ "jsx_a11y/img-redundant-alt": "error",
76
+
77
+ // Enforce that a label tag has a text label and an associated control
78
+ // 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",
81
+ {
82
+ "labelComponents": [],
83
+ "labelAttributes": [],
84
+ "controlComponents": [],
85
+ "assert": "both",
86
+ "depth": 25,
87
+ },
88
+ ],
89
+
90
+ // Enforce lang attribute has a valid value
91
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/lang.md
92
+ "jsx_a11y/lang": "error",
93
+
94
+ // Enforce that media elements have captions
95
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/media-has-caption.md
96
+ "jsx_a11y/media-has-caption": "error",
97
+
98
+ // Enforce that onMouseOver/onMouseOut are accompanied by onFocus/onBlur
99
+ // 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",
101
+
102
+ // Enforce that the accessKey prop is not used on any element
103
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-access-key.md
104
+ "jsx_a11y/no-access-key": "error",
105
+
106
+ // Enforce autoFocus prop is not used
107
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-autofocus.md
108
+ "jsx_a11y/no-autofocus": ["error", { "ignoreNonDOM": true }],
109
+
110
+ // Enforce distracting elements are not used
111
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-distracting-elements.md
112
+ "jsx_a11y/no-distracting-elements": "error",
113
+
114
+ // Enforce tabIndex value is not greater than zero
115
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/tabindex-no-positive.md
116
+ "jsx_a11y/tabindex-no-positive": "error",
117
+
118
+ // Ensure interactive elements are not assigned non-interactive roles
119
+ // 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",
122
+ {
123
+ "tags": [],
124
+ "roles": ["tabpanel"],
125
+ },
126
+ ],
127
+
128
+ // Enforce explicit role is not redundant with implicit role of the element
129
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/no-redundant-roles.md
130
+ "jsx_a11y/no-redundant-roles": "error",
131
+
132
+ // Enforce that non-interactive, visible elements with click handlers use the role attribute
133
+ // 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",
135
+
136
+ // Enforce scope prop is only used on <th> elements
137
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/scope.md
138
+ "jsx_a11y/scope": "error",
139
+
140
+ // Enforce that anchor elements have non-ambiguous text content
141
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-ambiguous-text.md
142
+ "jsx_a11y/anchor-ambiguous-text": "error",
143
+
144
+ // Enforce that aria-hidden="true" is not set on focusable elements
145
+ // 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",
147
+
148
+ // Prefer semantic HTML elements over role attributes
149
+ // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/prefer-tag-over-role.md
150
+ // decision: left to implementer
151
+ "jsx_a11y/prefer-tag-over-role": "off",
152
+ },
153
+ }