@ver0/oxlint-config 2.0.0 → 2.0.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/README.md CHANGED
@@ -84,15 +84,16 @@ export default defineConfig({
84
84
 
85
85
  ## 📦 Available Configs
86
86
 
87
- Each config is a standalone module scoped to its own file globs. Import it to enable, skip it to disable no options,
88
- no per-config dependencies.
87
+ Each config is a standalone module; oxlint lints JS and TS uniformly, so modules apply to all lintable files (only
88
+ the vitest module scopes itself to test files). Import to enable, skip to disable — no options, no per-config
89
+ dependencies.
89
90
 
90
- - **JavaScript** (`javascript.js`) — base rules for `*.js(x)` files: ESLint core plus `unicorn`, `import`, and
91
- `promise` rules. Always include this one — other configs build on top of it.
91
+ - **JavaScript** (`javascript.js`) — base rules: ESLint core plus `unicorn`, `import`, `promise` and `oxc` rules.
92
+ Always include this one — other configs build on top of it.
92
93
 
93
- - **TypeScript** (`typescript.js`) — the JS rule set plus `typescript` rules for `*.ts(x)` files. Enables type-aware
94
- linting — see [Type-aware linting](#type-aware-linting). Also exports `typescriptUnsafe` to disable strict
95
- `no-unsafe-*` type-safety rules:
94
+ - **TypeScript** (`typescript.js`) — `typescript` plugin rules with type-aware linting see
95
+ [Type-aware linting](#type-aware-linting). Also exports `typescriptUnsafe` to disable strict `no-unsafe-*`
96
+ type-safety rules:
96
97
 
97
98
  ```ts
98
99
  import typescript, {typescriptUnsafe} from '@ver0/oxlint-config/typescript.js';
@@ -191,3 +192,33 @@ export default defineConfig({
191
192
  },
192
193
  });
193
194
  ```
195
+
196
+ **Your `overrides` losing to the presets?** oxlint merges a consumer's top-level `overrides` _before_ the extended
197
+ configs, so preset overrides (e.g. vitest's plugin enablement for test files) win. Compose your own overrides as the
198
+ last `extends` entry instead — and note that rules of a plugin enabled only inside an override (like `vitest/*`) are
199
+ silently ignored in your override unless it redeclares the plugin:
200
+
201
+ ```ts
202
+ // oxlint.config.ts
203
+ import {defineConfig} from 'oxlint';
204
+ import javascript from '@ver0/oxlint-config/javascript.js';
205
+ import vitest from '@ver0/oxlint-config/vitest.js';
206
+
207
+ export default defineConfig({
208
+ extends: [
209
+ javascript,
210
+ vitest,
211
+ {
212
+ overrides: [
213
+ {
214
+ files: ['**/*.test.*'],
215
+ plugins: ['vitest'],
216
+ rules: {
217
+ 'vitest/no-disabled-tests': 'off',
218
+ },
219
+ },
220
+ ],
221
+ },
222
+ ],
223
+ });
224
+ ```
@@ -11,6 +11,11 @@ const typescript = {
11
11
  typeAware: true,
12
12
  },
13
13
  rules: {
14
+ // typescript/require-await (type-aware) supersedes it and exempts
15
+ // promise-returning bodies; with the base rule on, promise-function-async
16
+ // + return-await leave no compliant shape for `async fn() { return promise; }`.
17
+ 'require-await': 'off',
18
+
14
19
  'typescript/adjacent-overload-signatures': 'error',
15
20
  'typescript/array-type': [
16
21
  'error',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ver0/oxlint-config",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Oxlint configs used in all ver0 projects",
5
5
  "keywords": [
6
6
  "config",