@ver0/oxlint-config 1.0.0 → 2.0.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.
package/README.md CHANGED
@@ -18,7 +18,7 @@ A collection of modular [Oxlint](https://oxc.rs/docs/guide/usage/linter) configs
18
18
  [`@ver0/eslint-config`](https://github.com/ver0-project/eslint-config) counterpart for the VoidZero stack (Vite+,
19
19
  Oxc). Import only what you need and compose via `extends`.
20
20
 
21
- - **JavaScript** — base rules plus `unicorn`, `import`, and `promise` plugins
21
+ - **JavaScript** — base rules plus `unicorn`, `import`, `promise` and `oxc` plugins
22
22
  - **TypeScript** — TypeScript rules with type-aware linting
23
23
  - **React** — React and hooks rules
24
24
  - **Node.js** — Node globals and `node` plugin rules
@@ -27,6 +27,15 @@ Oxc). Import only what you need and compose via `extends`.
27
27
 
28
28
  Every rule is implemented natively in Rust inside the oxlint binary — configs need **no plugin dependencies** at all.
29
29
 
30
+ ### Rule philosophy
31
+
32
+ Configs are **category-driven**: the `correctness`, `suspicious`, `pedantic` and `perf` categories are enabled
33
+ wholesale, so new oxlint rules in those categories roll in automatically with linter updates. The `style` and
34
+ `restriction` categories are deliberately not enabled — `style` contains mutually contradictory rules
35
+ (`no-ternary` vs `prefer-ternary`) and vocabulary policing; instead, a curated set of style and restriction rules is
36
+ enabled explicitly. Org-wide opinions are pinned as explicit `off` entries so they hold even if a consumer enables
37
+ more categories.
38
+
30
39
  ## 🚀 Installation
31
40
 
32
41
  ```bash
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Browser globals that shadow common identifiers and cause confusing bugs
3
+ * when referenced without qualification (`window.` prefix).
4
+ *
5
+ * Mirrors the `confusing-browser-globals` package.
6
+ *
7
+ * @type {string[]}
8
+ */
9
+ export default [
10
+ 'addEventListener',
11
+ 'blur',
12
+ 'close',
13
+ 'closed',
14
+ 'confirm',
15
+ 'defaultStatus',
16
+ 'defaultstatus',
17
+ 'event',
18
+ 'external',
19
+ 'find',
20
+ 'focus',
21
+ 'frameElement',
22
+ 'frames',
23
+ 'history',
24
+ 'innerHeight',
25
+ 'innerWidth',
26
+ 'length',
27
+ 'location',
28
+ 'locationbar',
29
+ 'menubar',
30
+ 'moveBy',
31
+ 'moveTo',
32
+ 'name',
33
+ 'onblur',
34
+ 'onerror',
35
+ 'onfocus',
36
+ 'onload',
37
+ 'onresize',
38
+ 'onunload',
39
+ 'open',
40
+ 'opener',
41
+ 'opera',
42
+ 'outerHeight',
43
+ 'outerWidth',
44
+ 'pageXOffset',
45
+ 'pageYOffset',
46
+ 'parent',
47
+ 'print',
48
+ 'removeEventListener',
49
+ 'resizeBy',
50
+ 'resizeTo',
51
+ 'screen',
52
+ 'screenLeft',
53
+ 'screenTop',
54
+ 'screenX',
55
+ 'screenY',
56
+ 'scroll',
57
+ 'scrollbars',
58
+ 'scrollBy',
59
+ 'scrollTo',
60
+ 'scrollX',
61
+ 'scrollY',
62
+ 'self',
63
+ 'status',
64
+ 'statusbar',
65
+ 'stop',
66
+ 'toolbar',
67
+ 'top',
68
+ ];
@@ -1,86 +1,14 @@
1
- import {GLOBS} from '../utils/globs.js';
1
+ import confusingBrowserGlobals from './browser-globals.js';
2
2
 
3
3
  /** @type {import('oxlint').OxlintConfig} */
4
4
  const browser = {
5
- plugins: [],
6
- categories: {
7
- correctness: 'off',
8
- },
9
5
  env: {
10
- builtin: true,
6
+ browser: true,
7
+ es2026: true,
8
+ },
9
+ rules: {
10
+ 'no-restricted-globals': ['error', ...confusingBrowserGlobals],
11
11
  },
12
- overrides: [
13
- {
14
- files: [GLOBS.JS, GLOBS.TS],
15
- rules: {
16
- 'no-restricted-globals': [
17
- 'error',
18
- 'addEventListener',
19
- 'blur',
20
- 'close',
21
- 'closed',
22
- 'confirm',
23
- 'defaultStatus',
24
- 'defaultstatus',
25
- 'event',
26
- 'external',
27
- 'find',
28
- 'focus',
29
- 'frameElement',
30
- 'frames',
31
- 'history',
32
- 'innerHeight',
33
- 'innerWidth',
34
- 'length',
35
- 'location',
36
- 'locationbar',
37
- 'menubar',
38
- 'moveBy',
39
- 'moveTo',
40
- 'name',
41
- 'onblur',
42
- 'onerror',
43
- 'onfocus',
44
- 'onload',
45
- 'onresize',
46
- 'onunload',
47
- 'open',
48
- 'opener',
49
- 'opera',
50
- 'outerHeight',
51
- 'outerWidth',
52
- 'pageXOffset',
53
- 'pageYOffset',
54
- 'parent',
55
- 'print',
56
- 'removeEventListener',
57
- 'resizeBy',
58
- 'resizeTo',
59
- 'screen',
60
- 'screenLeft',
61
- 'screenTop',
62
- 'screenX',
63
- 'screenY',
64
- 'scroll',
65
- 'scrollbars',
66
- 'scrollBy',
67
- 'scrollTo',
68
- 'scrollX',
69
- 'scrollY',
70
- 'self',
71
- 'status',
72
- 'statusbar',
73
- 'stop',
74
- 'toolbar',
75
- 'top',
76
- ],
77
- },
78
- env: {
79
- browser: true,
80
- es2026: true,
81
- },
82
- },
83
- ],
84
12
  };
85
13
 
86
14
  export default browser;
@@ -1,263 +1,130 @@
1
- import {GLOBS} from '../utils/globs.js';
2
-
3
1
  /** @type {import('oxlint').OxlintConfig} */
4
2
  const javascript = {
5
- plugins: [],
3
+ plugins: ['import', 'oxc', 'promise', 'unicorn'],
6
4
  categories: {
7
- correctness: 'off',
5
+ correctness: 'error',
6
+ suspicious: 'error',
7
+ pedantic: 'error',
8
+ perf: 'error',
8
9
  },
9
10
  env: {
10
11
  builtin: true,
12
+ es2026: true,
11
13
  },
12
- overrides: [
13
- {
14
- files: [GLOBS.JS],
15
- rules: {
16
- 'constructor-super': 'error',
17
- 'for-direction': 'error',
18
- 'getter-return': 'error',
19
- 'no-async-promise-executor': 'error',
20
- 'no-case-declarations': 'error',
21
- 'no-class-assign': 'error',
22
- 'no-compare-neg-zero': 'error',
23
- 'no-cond-assign': 'error',
24
- 'no-const-assign': 'error',
25
- 'no-constant-binary-expression': 'error',
26
- 'no-constant-condition': 'error',
27
- 'no-control-regex': 'error',
28
- 'no-debugger': 'error',
29
- 'no-delete-var': 'error',
30
- 'no-dupe-class-members': 'error',
31
- 'no-dupe-else-if': 'error',
32
- 'no-dupe-keys': 'error',
33
- 'no-duplicate-case': 'error',
34
- 'no-empty': 'error',
35
- 'no-empty-character-class': 'error',
36
- 'no-empty-pattern': 'error',
37
- 'no-empty-static-block': 'error',
38
- 'no-ex-assign': 'error',
39
- 'no-extra-boolean-cast': 'error',
40
- 'no-fallthrough': 'error',
41
- 'no-func-assign': 'error',
42
- 'no-global-assign': 'error',
43
- 'no-import-assign': 'error',
44
- 'no-invalid-regexp': 'error',
45
- 'no-irregular-whitespace': 'error',
46
- 'no-loss-of-precision': 'error',
47
- 'no-misleading-character-class': 'error',
48
- 'no-new-native-nonconstructor': 'error',
49
- 'no-nonoctal-decimal-escape': 'error',
50
- 'no-obj-calls': 'error',
51
- 'no-prototype-builtins': 'error',
52
- 'no-redeclare': 'error',
53
- 'no-regex-spaces': 'error',
54
- 'no-self-assign': 'error',
55
- 'no-setter-return': 'error',
56
- 'no-shadow-restricted-names': 'error',
57
- 'no-sparse-arrays': 'error',
58
- 'no-this-before-super': 'error',
59
- 'no-unassigned-vars': 'error',
60
- 'no-unexpected-multiline': 'error',
61
- 'no-unreachable': 'error',
62
- 'no-unsafe-finally': 'error',
63
- 'no-unsafe-negation': 'error',
64
- 'no-unsafe-optional-chaining': 'error',
65
- 'no-unused-labels': 'error',
66
- 'no-unused-private-class-members': 'error',
67
- 'no-unused-vars': 'error',
68
- 'no-useless-backreference': 'error',
69
- 'no-useless-catch': 'error',
70
- 'no-useless-escape': 'error',
71
- 'no-with': 'error',
72
- 'preserve-caught-error': 'error',
73
- 'require-yield': 'error',
74
- 'use-isnan': 'error',
75
- 'valid-typeof': 'error',
76
- 'import/namespace': 'error',
77
- 'import/default': 'error',
78
- 'import/no-named-as-default': 'error',
79
- 'import/no-named-as-default-member': 'error',
80
- 'import/no-duplicates': [
81
- 'error',
82
- {
83
- 'prefer-inline': false,
84
- },
85
- ],
86
- 'promise/always-return': 'error',
87
- 'promise/no-return-wrap': [
88
- 'error',
89
- {
90
- allowReject: true,
91
- },
92
- ],
93
- 'promise/param-names': 'error',
94
- 'promise/catch-or-return': 'error',
95
- 'promise/no-nesting': 'warn',
96
- 'promise/no-promise-in-callback': 'warn',
97
- 'promise/no-callback-in-promise': 'warn',
98
- 'promise/avoid-new': 'off',
99
- 'promise/no-new-statics': 'error',
100
- 'promise/valid-params': 'error',
101
- 'no-negated-condition': 'off',
102
- 'no-nested-ternary': 'off',
103
- 'unicorn/catch-error-name': 'error',
104
- 'unicorn/consistent-assert': 'error',
105
- 'unicorn/consistent-date-clone': 'error',
106
- 'unicorn/consistent-empty-array-spread': 'error',
107
- 'unicorn/consistent-existence-index-check': 'error',
108
- 'unicorn/consistent-function-scoping': 'off',
109
- 'unicorn/consistent-template-literal-escape': 'error',
110
- 'unicorn/custom-error-definition': 'off',
111
- 'unicorn/empty-brace-spaces': 'error',
112
- 'unicorn/error-message': 'error',
113
- 'unicorn/escape-case': 'error',
114
- 'unicorn/explicit-length-check': 'error',
115
- 'unicorn/filename-case': 'error',
116
- 'unicorn/import-style': 'error',
117
- 'unicorn/new-for-builtins': 'error',
118
- 'unicorn/no-abusive-eslint-disable': 'error',
119
- 'unicorn/no-accessor-recursion': 'error',
120
- 'unicorn/no-anonymous-default-export': 'error',
121
- 'unicorn/no-array-callback-reference': 'error',
122
- 'unicorn/no-array-fill-with-reference-type': 'error',
123
- 'unicorn/no-array-for-each': 'error',
124
- 'unicorn/no-array-method-this-argument': 'error',
125
- 'unicorn/no-array-reduce': 'error',
126
- 'unicorn/no-array-reverse': 'error',
127
- 'unicorn/no-array-sort': 'error',
128
- 'unicorn/no-await-expression-member': 'error',
129
- 'unicorn/no-await-in-promise-methods': 'error',
130
- 'unicorn/no-console-spaces': 'error',
131
- 'unicorn/no-document-cookie': 'error',
132
- 'unicorn/no-empty-file': 'error',
133
- 'unicorn/no-hex-escape': 'error',
134
- 'unicorn/no-immediate-mutation': 'error',
135
- 'unicorn/no-instanceof-builtins': 'error',
136
- 'unicorn/no-invalid-fetch-options': 'error',
137
- 'unicorn/no-invalid-remove-event-listener': 'error',
138
- 'unicorn/no-lonely-if': 'error',
139
- 'unicorn/no-magic-array-flat-depth': 'error',
140
- 'unicorn/no-negated-condition': 'error',
141
- 'unicorn/no-negation-in-equality-check': 'error',
142
- 'unicorn/no-nested-ternary': 'error',
143
- 'unicorn/no-new-array': 'error',
144
- 'unicorn/no-new-buffer': 'error',
145
- 'unicorn/no-null': 'off',
146
- 'unicorn/no-object-as-default-parameter': 'error',
147
- 'unicorn/no-process-exit': 'error',
148
- 'unicorn/no-single-promise-in-promise-methods': 'error',
149
- 'unicorn/no-static-only-class': 'error',
150
- 'unicorn/no-thenable': 'error',
151
- 'unicorn/no-this-assignment': 'error',
152
- 'unicorn/no-typeof-undefined': 'error',
153
- 'unicorn/no-unnecessary-array-flat-depth': 'error',
154
- 'unicorn/no-unnecessary-array-splice-count': 'error',
155
- 'unicorn/no-unnecessary-await': 'error',
156
- 'unicorn/no-unnecessary-slice-end': 'error',
157
- 'unicorn/no-unreadable-array-destructuring': 'error',
158
- 'unicorn/no-unreadable-iife': 'error',
159
- 'unicorn/no-useless-collection-argument': 'error',
160
- 'unicorn/no-useless-error-capture-stack-trace': 'error',
161
- 'unicorn/no-useless-fallback-in-spread': 'error',
162
- 'unicorn/no-useless-length-check': 'error',
163
- 'unicorn/no-useless-promise-resolve-reject': 'error',
164
- 'unicorn/no-useless-spread': 'error',
165
- 'unicorn/no-useless-switch-case': 'error',
166
- 'unicorn/no-useless-undefined': 'off',
167
- 'unicorn/no-zero-fractions': 'error',
168
- 'unicorn/number-literal-case': 'error',
169
- 'unicorn/numeric-separators-style': 'error',
170
- 'unicorn/prefer-add-event-listener': 'error',
171
- 'unicorn/prefer-array-find': 'error',
172
- 'unicorn/prefer-array-flat': 'error',
173
- 'unicorn/prefer-array-flat-map': 'error',
174
- 'unicorn/prefer-array-index-of': 'error',
175
- 'unicorn/prefer-array-some': 'error',
176
- 'unicorn/prefer-at': 'error',
177
- 'unicorn/prefer-bigint-literals': 'error',
178
- 'unicorn/prefer-blob-reading-methods': 'error',
179
- 'unicorn/prefer-class-fields': 'error',
180
- 'unicorn/prefer-classlist-toggle': 'error',
181
- 'unicorn/prefer-code-point': 'error',
182
- 'unicorn/prefer-date-now': 'error',
183
- 'unicorn/prefer-default-parameters': 'error',
184
- 'unicorn/prefer-dom-node-append': 'error',
185
- 'unicorn/prefer-dom-node-remove': 'error',
186
- 'unicorn/prefer-dom-node-text-content': 'error',
187
- 'unicorn/prefer-event-target': 'error',
188
- 'unicorn/prefer-export-from': 'error',
189
- 'unicorn/prefer-global-this': 'error',
190
- 'unicorn/prefer-import-meta-properties': 'off',
191
- 'unicorn/prefer-includes': 'error',
192
- 'unicorn/prefer-keyboard-event-key': 'error',
193
- 'unicorn/prefer-logical-operator-over-ternary': 'error',
194
- 'unicorn/prefer-math-min-max': 'error',
195
- 'unicorn/prefer-math-trunc': 'error',
196
- 'unicorn/prefer-modern-dom-apis': 'error',
197
- 'unicorn/prefer-modern-math-apis': 'error',
198
- 'unicorn/prefer-module': 'error',
199
- 'unicorn/prefer-native-coercion-functions': 'error',
200
- 'unicorn/prefer-negative-index': 'error',
201
- 'unicorn/prefer-node-protocol': 'error',
202
- 'unicorn/prefer-number-properties': 'error',
203
- 'unicorn/prefer-object-from-entries': 'error',
204
- 'unicorn/prefer-optional-catch-binding': 'error',
205
- 'unicorn/prefer-prototype-methods': 'error',
206
- 'unicorn/prefer-query-selector': 'error',
207
- 'unicorn/prefer-reflect-apply': 'error',
208
- 'unicorn/prefer-regexp-test': 'error',
209
- 'unicorn/prefer-response-static-json': 'error',
210
- 'unicorn/prefer-set-has': 'error',
211
- 'unicorn/prefer-set-size': 'error',
212
- 'unicorn/prefer-single-call': 'error',
213
- 'unicorn/prefer-spread': 'error',
214
- 'unicorn/prefer-string-raw': 'off',
215
- 'unicorn/prefer-string-replace-all': 'error',
216
- 'unicorn/prefer-string-slice': 'error',
217
- 'unicorn/prefer-string-starts-ends-with': 'error',
218
- 'unicorn/prefer-string-trim-start-end': 'error',
219
- 'unicorn/prefer-structured-clone': 'error',
220
- 'unicorn/prefer-ternary': 'off',
221
- 'unicorn/prefer-top-level-await': 'error',
222
- 'unicorn/prefer-type-error': 'error',
223
- 'unicorn/relative-url-style': 'error',
224
- 'unicorn/require-array-join-separator': 'error',
225
- 'unicorn/require-module-attributes': 'error',
226
- 'unicorn/require-module-specifiers': 'error',
227
- 'unicorn/require-number-to-fixed-digits-argument': 'error',
228
- 'unicorn/require-post-message-target-origin': 'off',
229
- 'unicorn/switch-case-braces': 'error',
230
- 'unicorn/switch-case-break-position': 'error',
231
- 'unicorn/text-encoding-identifier-case': 'error',
232
- 'unicorn/throw-new-error': 'error',
233
- 'capitalized-comments': 'off',
234
- 'import/first': 'error',
235
- 'import/no-unassigned-import': 'off',
236
- 'import/extensions': [
237
- 'error',
238
- 'always',
239
- {
240
- ignorePackages: true,
241
- },
242
- ],
243
- 'import/no-absolute-path': 'error',
244
- 'import/no-anonymous-default-export': 'off',
245
- 'import/no-named-default': 'error',
246
- 'import/no-webpack-loader-syntax': 'error',
247
- 'import/no-self-import': 'error',
248
- 'import/no-cycle': 'off',
249
- 'import/newline-after-import': 'error',
250
- 'import/no-amd': 'error',
251
- 'import/no-empty-named-blocks': 'error',
252
- 'import/no-mutable-exports': 'error',
253
- 'promise/prefer-await-to-then': 'error',
14
+ rules: {
15
+ 'capitalized-comments': 'off',
16
+ 'import/extensions': [
17
+ 'error',
18
+ 'always',
19
+ {
20
+ ignorePackages: true,
21
+ },
22
+ ],
23
+ 'import/first': 'error',
24
+ 'import/max-dependencies': 'off',
25
+ 'import/newline-after-import': 'error',
26
+ 'import/no-amd': 'error',
27
+ 'import/no-anonymous-default-export': 'off',
28
+ 'import/no-cycle': 'off',
29
+ 'import/no-duplicates': [
30
+ 'error',
31
+ {
32
+ 'prefer-inline': false,
254
33
  },
255
- plugins: ['import', 'promise', 'unicorn'],
256
- env: {
257
- es2026: true,
34
+ ],
35
+ 'import/no-mutable-exports': 'error',
36
+ 'import/no-named-default': 'error',
37
+ 'import/no-unassigned-import': 'off',
38
+ 'import/no-webpack-loader-syntax': 'error',
39
+ 'max-classes-per-file': 'off',
40
+ 'max-depth': 'off',
41
+ 'max-lines': 'off',
42
+ 'max-lines-per-function': 'off',
43
+ 'max-nested-callbacks': 'off',
44
+ 'no-empty': 'error',
45
+ 'no-inline-comments': 'off',
46
+ 'no-negated-condition': 'off',
47
+ 'no-nested-ternary': 'off',
48
+ 'no-regex-spaces': 'error',
49
+ 'no-warning-comments': 'off',
50
+ 'promise/avoid-new': 'off',
51
+ 'promise/catch-or-return': 'error',
52
+ 'promise/no-nesting': 'warn',
53
+ 'promise/no-return-wrap': [
54
+ 'error',
55
+ {
56
+ allowReject: true,
258
57
  },
259
- },
260
- ],
58
+ ],
59
+ 'promise/param-names': 'error',
60
+ 'promise/prefer-await-to-then': 'error',
61
+ 'require-unicode-regexp': 'off',
62
+ 'sort-vars': 'off',
63
+ 'unicorn/catch-error-name': 'error',
64
+ 'unicorn/consistent-date-clone': 'error',
65
+ 'unicorn/consistent-existence-index-check': 'error',
66
+ 'unicorn/consistent-function-scoping': 'off',
67
+ 'unicorn/consistent-template-literal-escape': 'error',
68
+ 'unicorn/custom-error-definition': 'off',
69
+ 'unicorn/empty-brace-spaces': 'error',
70
+ 'unicorn/error-message': 'error',
71
+ 'unicorn/filename-case': 'error',
72
+ 'unicorn/import-style': 'error',
73
+ 'unicorn/no-abusive-eslint-disable': 'error',
74
+ 'unicorn/no-anonymous-default-export': 'error',
75
+ 'unicorn/no-array-for-each': 'error',
76
+ 'unicorn/no-array-method-this-argument': 'error',
77
+ 'unicorn/no-array-reduce': 'error',
78
+ 'unicorn/no-await-expression-member': 'error',
79
+ 'unicorn/no-console-spaces': 'error',
80
+ 'unicorn/no-document-cookie': 'error',
81
+ 'unicorn/no-magic-array-flat-depth': 'error',
82
+ 'unicorn/no-nested-ternary': 'error',
83
+ 'unicorn/no-null': 'off',
84
+ 'unicorn/no-process-exit': 'error',
85
+ 'unicorn/no-unreadable-array-destructuring': 'error',
86
+ 'unicorn/no-useless-collection-argument': 'error',
87
+ 'unicorn/no-useless-error-capture-stack-trace': 'error',
88
+ 'unicorn/no-useless-undefined': 'off',
89
+ 'unicorn/no-zero-fractions': 'error',
90
+ 'unicorn/number-literal-case': 'error',
91
+ 'unicorn/numeric-separators-style': 'error',
92
+ 'unicorn/prefer-array-index-of': 'error',
93
+ 'unicorn/prefer-bigint-literals': 'error',
94
+ 'unicorn/prefer-class-fields': 'error',
95
+ 'unicorn/prefer-classlist-toggle': 'error',
96
+ 'unicorn/prefer-default-parameters': 'error',
97
+ 'unicorn/prefer-dom-node-text-content': 'error',
98
+ 'unicorn/prefer-export-from': 'error',
99
+ 'unicorn/prefer-global-this': 'error',
100
+ 'unicorn/prefer-import-meta-properties': 'off',
101
+ 'unicorn/prefer-includes': 'error',
102
+ 'unicorn/prefer-keyboard-event-key': 'error',
103
+ 'unicorn/prefer-logical-operator-over-ternary': 'error',
104
+ 'unicorn/prefer-modern-dom-apis': 'error',
105
+ 'unicorn/prefer-modern-math-apis': 'error',
106
+ 'unicorn/prefer-module': 'error',
107
+ 'unicorn/prefer-negative-index': 'error',
108
+ 'unicorn/prefer-node-protocol': 'error',
109
+ 'unicorn/prefer-number-properties': 'error',
110
+ 'unicorn/prefer-object-from-entries': 'error',
111
+ 'unicorn/prefer-optional-catch-binding': 'error',
112
+ 'unicorn/prefer-reflect-apply': 'error',
113
+ 'unicorn/prefer-response-static-json': 'error',
114
+ 'unicorn/prefer-spread': 'error',
115
+ 'unicorn/prefer-string-raw': 'off',
116
+ 'unicorn/prefer-string-trim-start-end': 'error',
117
+ 'unicorn/prefer-structured-clone': 'error',
118
+ 'unicorn/prefer-ternary': 'off',
119
+ 'unicorn/relative-url-style': 'error',
120
+ 'unicorn/require-array-join-separator': 'error',
121
+ 'unicorn/require-module-attributes': 'error',
122
+ 'unicorn/require-post-message-target-origin': 'off',
123
+ 'unicorn/switch-case-braces': 'error',
124
+ 'unicorn/switch-case-break-position': 'error',
125
+ 'unicorn/text-encoding-identifier-case': 'error',
126
+ 'unicorn/throw-new-error': 'error',
127
+ },
261
128
  };
262
129
 
263
130
  export default javascript;
package/configs/node.js CHANGED
@@ -1,43 +1,23 @@
1
- import {GLOBS} from '../utils/globs.js';
2
-
3
1
  /** @type {import('oxlint').OxlintConfig} */
4
2
  const node = {
5
- plugins: [],
6
- categories: {
7
- correctness: 'off',
8
- },
3
+ plugins: ['node'],
9
4
  env: {
10
- builtin: true,
5
+ node: true,
6
+ es2026: true,
7
+ },
8
+ globals: {
9
+ __dirname: 'off',
10
+ __filename: 'off',
11
+ exports: 'off',
12
+ module: 'off',
13
+ require: 'off',
14
+ },
15
+ rules: {
16
+ 'node/no-exports-assign': 'error',
17
+ 'node/no-mixed-requires': ['error', {grouping: true, allowCall: true}],
18
+ 'node/no-new-require': 'error',
19
+ 'node/no-path-concat': 'error',
11
20
  },
12
- overrides: [
13
- {
14
- files: [GLOBS.JS, GLOBS.TS],
15
- rules: {
16
- 'node/no-exports-assign': 'error',
17
- 'node/no-mixed-requires': [
18
- 'error',
19
- {
20
- grouping: true,
21
- allowCall: true,
22
- },
23
- ],
24
- 'node/no-new-require': 'error',
25
- 'node/no-path-concat': 'error',
26
- },
27
- globals: {
28
- __dirname: 'off',
29
- __filename: 'off',
30
- exports: 'off',
31
- module: 'off',
32
- require: 'off',
33
- },
34
- plugins: ['node'],
35
- env: {
36
- es2026: true,
37
- node: true,
38
- },
39
- },
40
- ],
41
21
  };
42
22
 
43
23
  export default node;