oxlint-config-presets 0.1.6 → 0.1.7

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
@@ -45,6 +45,23 @@ You can also compose multiple presets. Later entries override earlier ones:
45
45
  > Oxlint currently expects `extends` values to be **JSON file paths** relative to your config file.
46
46
  > For presets in this package, use `./node_modules/oxlint-config-presets/<config>.json`.
47
47
 
48
+ ### Usage with `oxlint.config.ts`
49
+
50
+ If you use a [TypeScript config file](https://oxc.rs/docs/guide/usage/linter/config) (`oxlint.config.ts`), you can import presets directly. TypeScript type definitions are included for all presets:
51
+
52
+ ```typescript
53
+ import airbnb from 'oxlint-config-presets/airbnb.json' with { type: 'json' };
54
+ import tsStrict from 'oxlint-config-presets/@typescript-eslint/strict-type-checked.json' with { type: 'json' };
55
+ import { defineConfig } from 'oxlint';
56
+
57
+ export default defineConfig({
58
+ extends: [airbnb, tsStrict],
59
+ });
60
+ ```
61
+
62
+ > [!NOTE]
63
+ > Requires Node.js v22.18+ or v24+ for `with { type: "json" }` (import attributes) support.
64
+
48
65
  <!-- GENERATED CONFIGS START -->
49
66
 
50
67
  ## Available configs
@@ -0,0 +1,3 @@
1
+ import type { OxlintConfig } from 'oxlint';
2
+ declare const config: OxlintConfig;
3
+ export default config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint-config-presets",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Oxlint configurations ported from popular ESLint styleguides",
5
5
  "keywords": [
6
6
  "config",
@@ -18,5 +18,19 @@
18
18
  "type": "git",
19
19
  "url": "git+https://github.com/popup-plus/oxlint-config-presets.git"
20
20
  },
21
- "type": "module"
21
+ "type": "module",
22
+ "exports": {
23
+ "./*.json": {
24
+ "types": "./oxlint-config.d.ts",
25
+ "default": "./*.json"
26
+ }
27
+ },
28
+ "peerDependencies": {
29
+ "oxlint": ">=0.15.0"
30
+ },
31
+ "peerDependenciesMeta": {
32
+ "oxlint": {
33
+ "optional": true
34
+ }
35
+ }
22
36
  }