@jabworks/oxlint-config 0.1.1 → 0.3.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 +56 -12
- package/dist/index.cjs +25 -3
- package/dist/index.d.cts +17 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +17 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +24 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -4,11 +4,15 @@ Opinionated [oxlint](https://oxc.rs/docs/guide/usage/linter/) presets ported fro
|
|
|
4
4
|
|
|
5
5
|
## Presets
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
| Preset | Extends | Use for |
|
|
8
|
+
| ------------ | ------------ | ------------------------------------------------------ |
|
|
9
|
+
| `base` | — | Any JS/TS project |
|
|
10
|
+
| `typescript` | `base` | TypeScript-only additions (some type-aware, see below) |
|
|
11
|
+
| `react` | `typescript` | React libraries and apps |
|
|
12
|
+
| `next` | `typescript` | Next.js applications |
|
|
13
|
+
| `node` | `typescript` | Node.js backends and APIs |
|
|
14
|
+
| `library` | `typescript` | Framework-agnostic utility libraries |
|
|
15
|
+
| `vitest` | — | Vitest test files (composable overlay) |
|
|
12
16
|
|
|
13
17
|
## Installation
|
|
14
18
|
|
|
@@ -19,8 +23,9 @@ npm install -D oxlint oxlint-tsgolint @jabworks/oxlint-config
|
|
|
19
23
|
## Usage
|
|
20
24
|
|
|
21
25
|
```ts
|
|
22
|
-
// oxlint.config.ts
|
|
26
|
+
// oxlint.config.ts — pick the preset that matches your project
|
|
23
27
|
import { next } from '@jabworks/oxlint-config';
|
|
28
|
+
// or: import { node, library, react, typescript } from '@jabworks/oxlint-config';
|
|
24
29
|
import { defineConfig } from 'oxlint';
|
|
25
30
|
|
|
26
31
|
export default defineConfig({
|
|
@@ -32,8 +37,8 @@ export default defineConfig({
|
|
|
32
37
|
// package.json
|
|
33
38
|
{
|
|
34
39
|
"scripts": {
|
|
35
|
-
"lint": "oxlint --type-aware --deny-warnings"
|
|
36
|
-
}
|
|
40
|
+
"lint": "oxlint --type-aware --deny-warnings",
|
|
41
|
+
},
|
|
37
42
|
}
|
|
38
43
|
```
|
|
39
44
|
|
|
@@ -56,12 +61,51 @@ export default defineConfig({ extends: [custom] });
|
|
|
56
61
|
|
|
57
62
|
The typescript preset enables type-aware rules (`typescript/no-misused-promises`, `typescript/consistent-type-exports`, `typescript/restrict-template-expressions`, …). These require [`oxlint-tsgolint`](https://github.com/oxc-project/tsgolint) installed in the consuming project and running oxlint with `--type-aware`; without it they are silently skipped.
|
|
58
63
|
|
|
64
|
+
## Node and library presets
|
|
65
|
+
|
|
66
|
+
### `node`
|
|
67
|
+
|
|
68
|
+
Sets `env.node: true` and enables the built-in `node` plugin with Node.js best practices:
|
|
69
|
+
|
|
70
|
+
- `node/no-process-exit` — use `process.exitCode` instead of `process.exit()`
|
|
71
|
+
- `node/no-path-concat` — use `path.join()` or `path.resolve()` over string concatenation
|
|
72
|
+
- `node/no-new-require` — disallow `new require(…)`
|
|
73
|
+
- `node/no-exports-assign` — disallow reassigning `exports`
|
|
74
|
+
- `node/handle-callback-err` — enforce error handling in callbacks
|
|
75
|
+
|
|
76
|
+
Also includes a vitest test-file override (same as `react`).
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
// oxlint.config.ts
|
|
80
|
+
import { node } from '@jabworks/oxlint-config';
|
|
81
|
+
import { defineConfig } from 'oxlint';
|
|
82
|
+
|
|
83
|
+
export default defineConfig({ extends: [node] });
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
> **Note:** `n/prefer-promises/fs`, `n/prefer-promises/dns`, and `n/prefer-global/*` from `eslint-plugin-n` have no oxlint built-in equivalent as of 1.73. Use the ESLint `node` config alongside for those rules.
|
|
87
|
+
|
|
88
|
+
### `library`
|
|
89
|
+
|
|
90
|
+
No environment globals — suitable for framework-agnostic packages (utility libraries, shared hooks, etc.). Activates `import/no-cycle` which is disabled in `base` for performance.
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
// oxlint.config.ts
|
|
94
|
+
import { library } from '@jabworks/oxlint-config';
|
|
95
|
+
import { defineConfig } from 'oxlint';
|
|
96
|
+
|
|
97
|
+
export default defineConfig({ extends: [library] });
|
|
98
|
+
```
|
|
99
|
+
|
|
59
100
|
## Rules not ported from @jabworks/eslint-plugin
|
|
60
101
|
|
|
61
|
-
Unsupported by oxlint 1.
|
|
102
|
+
Unsupported by oxlint 1.73 (verified with `oxlint --rules` and `@oxlint/migrate --details`):
|
|
62
103
|
|
|
63
|
-
- Core: `no-
|
|
64
|
-
- Import: `newline-after-import`, `no-extraneous-dependencies`, `no-relative-packages`, `no-useless-path-segments`, `no-deprecated`
|
|
65
|
-
- TypeScript: `
|
|
104
|
+
- Core: `no-octal-escape`, `object-shorthand`, `camelcase`, `no-undef-init`
|
|
105
|
+
- Import: `newline-after-import`, `no-extraneous-dependencies`, `no-relative-packages`, `no-useless-path-segments`, `no-deprecated`, `prefer-default-export` (used by the ESLint `next` config's route-file override)
|
|
106
|
+
- TypeScript: `naming-convention`
|
|
66
107
|
- React: `function-component-definition`, `hook-use-state`, `jsx-no-leaked-render`, `jsx-sort-props`, `no-unstable-nested-components`
|
|
108
|
+
- Node: `n/prefer-promises/fs`, `n/prefer-promises/dns`, `n/no-callback-literal`, `n/prefer-global/*`
|
|
67
109
|
- Plugins with no oxlint equivalent: `simple-import-sort`, `eslint-comments`, `@stylistic` (formatting is Prettier's job)
|
|
110
|
+
|
|
111
|
+
Restored in oxlint 1.59–1.73 (previously dropped): `no-implied-eval`, `prefer-regex-literals`, `prefer-arrow-callback`, `no-unreachable-loop`, `typescript/method-signature-style`.
|
package/dist/index.cjs
CHANGED
|
@@ -3,9 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
/**
|
|
4
4
|
* Base preset, ported from `@jabworks/eslint-plugin` configs.base.
|
|
5
5
|
*
|
|
6
|
-
* Dropped (no oxlint equivalent as of 1.
|
|
7
|
-
*
|
|
8
|
-
* no-unreachable-loop, camelcase, prefer-arrow-callback, no-undef-init,
|
|
6
|
+
* Dropped (no oxlint equivalent as of 1.73): no-octal-escape,
|
|
7
|
+
* object-shorthand, camelcase, no-undef-init,
|
|
9
8
|
* import/newline-after-import, import/no-extraneous-dependencies,
|
|
10
9
|
* import/no-relative-packages, import/no-useless-path-segments,
|
|
11
10
|
* import/no-deprecated, simple-import-sort/*, eslint-comments/*, @stylistic/*.
|
|
@@ -30,6 +29,7 @@ const base = {
|
|
|
30
29
|
"eslint/no-extra-bind": "error",
|
|
31
30
|
"eslint/no-extra-label": "error",
|
|
32
31
|
"eslint/no-implicit-coercion": "error",
|
|
32
|
+
"eslint/no-implied-eval": "error",
|
|
33
33
|
"eslint/no-iterator": "error",
|
|
34
34
|
"eslint/no-labels": "error",
|
|
35
35
|
"eslint/no-lone-blocks": "error",
|
|
@@ -46,6 +46,7 @@ const base = {
|
|
|
46
46
|
"eslint/no-useless-concat": "error",
|
|
47
47
|
"eslint/no-useless-return": "warn",
|
|
48
48
|
"eslint/prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
|
|
49
|
+
"eslint/prefer-regex-literals": "error",
|
|
49
50
|
"eslint/yoda": "warn",
|
|
50
51
|
"eslint/no-useless-computed-key": "warn",
|
|
51
52
|
"eslint/no-useless-rename": "warn",
|
|
@@ -60,6 +61,7 @@ const base = {
|
|
|
60
61
|
"eslint/no-constant-binary-expression": "error",
|
|
61
62
|
"eslint/no-promise-executor-return": "error",
|
|
62
63
|
"eslint/no-template-curly-in-string": "error",
|
|
64
|
+
"eslint/no-unreachable-loop": "error",
|
|
63
65
|
"eslint/func-names": ["error", "as-needed"],
|
|
64
66
|
"eslint/new-cap": ["error", { capIsNew: false }],
|
|
65
67
|
"eslint/no-array-constructor": "error",
|
|
@@ -68,6 +70,7 @@ const base = {
|
|
|
68
70
|
"eslint/no-multi-assign": "error",
|
|
69
71
|
"eslint/no-nested-ternary": "error",
|
|
70
72
|
"eslint/no-unneeded-ternary": "error",
|
|
73
|
+
"eslint/prefer-arrow-callback": "warn",
|
|
71
74
|
"eslint/prefer-object-spread": "warn",
|
|
72
75
|
"eslint/no-label-var": "error",
|
|
73
76
|
"eslint/no-unused-vars": ["error", {
|
|
@@ -142,6 +145,7 @@ const typescript = mergeConfigs(base, {
|
|
|
142
145
|
fixStyle: "inline-type-imports",
|
|
143
146
|
prefer: "type-imports"
|
|
144
147
|
}],
|
|
148
|
+
"typescript/method-signature-style": "warn",
|
|
145
149
|
"typescript/no-misused-promises": ["error", { checksVoidReturn: { attributes: false } }],
|
|
146
150
|
"typescript/no-redundant-type-constituents": "warn",
|
|
147
151
|
"typescript/no-unnecessary-qualifier": "warn",
|
|
@@ -155,6 +159,7 @@ const typescript = mergeConfigs(base, {
|
|
|
155
159
|
"eslint/no-useless-constructor": "error"
|
|
156
160
|
}
|
|
157
161
|
});
|
|
162
|
+
const library = mergeConfigs(typescript, { rules: { "import/no-cycle": "error" } });
|
|
158
163
|
//#endregion
|
|
159
164
|
//#region src/configs/vitest.ts
|
|
160
165
|
/**
|
|
@@ -244,6 +249,19 @@ const next = mergeConfigs(react, {
|
|
|
244
249
|
}],
|
|
245
250
|
ignorePatterns: [".next/**"]
|
|
246
251
|
});
|
|
252
|
+
const node = mergeConfigs(typescript, {
|
|
253
|
+
plugins: ["node"],
|
|
254
|
+
env: { node: true },
|
|
255
|
+
rules: {
|
|
256
|
+
"node/no-process-exit": "error",
|
|
257
|
+
"node/no-path-concat": "error",
|
|
258
|
+
"node/no-new-require": "error",
|
|
259
|
+
"node/no-exports-assign": "error",
|
|
260
|
+
"node/handle-callback-err": "error",
|
|
261
|
+
"node/no-process-env": "off"
|
|
262
|
+
},
|
|
263
|
+
overrides: [vitestOverride]
|
|
264
|
+
});
|
|
247
265
|
//#endregion
|
|
248
266
|
//#region src/index.ts
|
|
249
267
|
const config = { configs: {
|
|
@@ -251,13 +269,17 @@ const config = { configs: {
|
|
|
251
269
|
typescript,
|
|
252
270
|
react,
|
|
253
271
|
next,
|
|
272
|
+
node,
|
|
273
|
+
library,
|
|
254
274
|
vitest
|
|
255
275
|
} };
|
|
256
276
|
//#endregion
|
|
257
277
|
exports.base = base;
|
|
258
278
|
exports.config = config;
|
|
279
|
+
exports.library = library;
|
|
259
280
|
exports.mergeConfigs = mergeConfigs;
|
|
260
281
|
exports.next = next;
|
|
282
|
+
exports.node = node;
|
|
261
283
|
exports.react = react;
|
|
262
284
|
exports.typescript = typescript;
|
|
263
285
|
exports.vitest = vitest;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
//#region src/types.d.ts
|
|
2
2
|
type OxlintSeverity = 'off' | 'warn' | 'error';
|
|
3
3
|
type OxlintRuleEntry = OxlintSeverity | [OxlintSeverity, ...unknown[]];
|
|
4
|
+
/**
|
|
5
|
+
* Mirrors oxlint's (unexported) `LintPluginOptionsSchema` union as of 1.73.
|
|
6
|
+
*/
|
|
7
|
+
type OxlintPlugin = 'eslint' | 'react' | 'unicorn' | 'typescript' | 'oxc' | 'import' | 'jsdoc' | 'jest' | 'vitest' | 'jsx-a11y' | 'nextjs' | 'react-perf' | 'promise' | 'node' | 'vue';
|
|
4
8
|
interface OxlintOverride {
|
|
5
9
|
files: string[];
|
|
6
|
-
plugins?:
|
|
10
|
+
plugins?: OxlintPlugin[];
|
|
7
11
|
rules?: Record<string, OxlintRuleEntry>;
|
|
8
12
|
env?: Record<string, boolean>;
|
|
9
13
|
}
|
|
10
14
|
interface OxlintConfig {
|
|
11
15
|
$schema?: string;
|
|
12
|
-
plugins?:
|
|
16
|
+
plugins?: OxlintPlugin[];
|
|
13
17
|
categories?: Record<string, OxlintSeverity>;
|
|
14
18
|
rules?: Record<string, OxlintRuleEntry>;
|
|
15
19
|
overrides?: OxlintOverride[];
|
|
@@ -22,15 +26,17 @@ interface OxlintConfig {
|
|
|
22
26
|
/**
|
|
23
27
|
* Base preset, ported from `@jabworks/eslint-plugin` configs.base.
|
|
24
28
|
*
|
|
25
|
-
* Dropped (no oxlint equivalent as of 1.
|
|
26
|
-
*
|
|
27
|
-
* no-unreachable-loop, camelcase, prefer-arrow-callback, no-undef-init,
|
|
29
|
+
* Dropped (no oxlint equivalent as of 1.73): no-octal-escape,
|
|
30
|
+
* object-shorthand, camelcase, no-undef-init,
|
|
28
31
|
* import/newline-after-import, import/no-extraneous-dependencies,
|
|
29
32
|
* import/no-relative-packages, import/no-useless-path-segments,
|
|
30
33
|
* import/no-deprecated, simple-import-sort/*, eslint-comments/*, @stylistic/*.
|
|
31
34
|
*/
|
|
32
35
|
declare const base: OxlintConfig;
|
|
33
36
|
//#endregion
|
|
37
|
+
//#region src/configs/library.d.ts
|
|
38
|
+
declare const library: OxlintConfig;
|
|
39
|
+
//#endregion
|
|
34
40
|
//#region src/configs/next.d.ts
|
|
35
41
|
/**
|
|
36
42
|
* Next.js preset, ported from `@jabworks/eslint-plugin` configs.next.
|
|
@@ -39,6 +45,9 @@ declare const base: OxlintConfig;
|
|
|
39
45
|
*/
|
|
40
46
|
declare const next: OxlintConfig;
|
|
41
47
|
//#endregion
|
|
48
|
+
//#region src/configs/node.d.ts
|
|
49
|
+
declare const node: OxlintConfig;
|
|
50
|
+
//#endregion
|
|
42
51
|
//#region src/configs/react.d.ts
|
|
43
52
|
declare const react: OxlintConfig;
|
|
44
53
|
//#endregion
|
|
@@ -64,9 +73,11 @@ declare const config: {
|
|
|
64
73
|
typescript: OxlintConfig;
|
|
65
74
|
react: OxlintConfig;
|
|
66
75
|
next: OxlintConfig;
|
|
76
|
+
node: OxlintConfig;
|
|
77
|
+
library: OxlintConfig;
|
|
67
78
|
vitest: OxlintConfig;
|
|
68
79
|
};
|
|
69
80
|
};
|
|
70
81
|
//#endregion
|
|
71
|
-
export { type OxlintConfig, type OxlintOverride, type OxlintRuleEntry, type OxlintSeverity, base, config, mergeConfigs, next, react, typescript, vitest };
|
|
82
|
+
export { type OxlintConfig, type OxlintOverride, type OxlintPlugin, type OxlintRuleEntry, type OxlintSeverity, base, config, library, mergeConfigs, next, node, react, typescript, vitest };
|
|
72
83
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/configs/base.ts","../src/configs/next.ts","../src/configs/react.ts","../src/configs/typescript.ts","../src/configs/vitest.ts","../src/lib/merge.ts","../src/index.ts"],"mappings":";KAAY,cAAA;AAAA,KAEA,eAAA,GAAkB,cAAA,IAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/configs/base.ts","../src/configs/library.ts","../src/configs/next.ts","../src/configs/node.ts","../src/configs/react.ts","../src/configs/typescript.ts","../src/configs/vitest.ts","../src/lib/merge.ts","../src/index.ts"],"mappings":";KAAY,cAAA;AAAA,KAEA,eAAA,GAAkB,cAAA,IAAkB,cAAc;;;;KAKlD,YAAA;AAAA,UAiBK,cAAA;EACf,KAAA;EACA,OAAA,GAAU,YAAA;EACV,KAAA,GAAQ,MAAA,SAAe,eAAA;EACvB,GAAA,GAAM,MAAA;AAAA;AAAA,UAGS,YAAA;EACf,OAAA;EACA,OAAA,GAAU,YAAA;EACV,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,KAAA,GAAQ,MAAA,SAAe,eAAA;EACvB,SAAA,GAAY,cAAA;EACZ,cAAA;EACA,GAAA,GAAM,MAAA;EACN,QAAA,GAAW,MAAA;AAAA;;;AAvCb;;;;AAA0B;AAE1B;;;;AAFA,cCWM,IAAA,EAAM,YA4GX;;;cCtGK,OAAA,EAAS,YAAqD;;;AFjBpE;;;;AAA0B;AAA1B,cGSM,IAAA,EAAM,YAoCV;;;cCjBI,IAAA,EAAM,YAAkD;;;cCUxD,KAAA,EAAO,YAAmD;;;cCK1D,UAAA,EAAY,YAAkD;;;cCrB9D,MAAA,EAAQ,YAKb;;;AP3BD;;;;AAA0B;AAE1B;AAFA,cQQa,YAAA,MAAmB,OAAA,EAAS,YAAA,OAAiB,YAqBzD;;;cClBY,MAAA;;UAUZ,YAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
//#region src/types.d.ts
|
|
2
2
|
type OxlintSeverity = 'off' | 'warn' | 'error';
|
|
3
3
|
type OxlintRuleEntry = OxlintSeverity | [OxlintSeverity, ...unknown[]];
|
|
4
|
+
/**
|
|
5
|
+
* Mirrors oxlint's (unexported) `LintPluginOptionsSchema` union as of 1.73.
|
|
6
|
+
*/
|
|
7
|
+
type OxlintPlugin = 'eslint' | 'react' | 'unicorn' | 'typescript' | 'oxc' | 'import' | 'jsdoc' | 'jest' | 'vitest' | 'jsx-a11y' | 'nextjs' | 'react-perf' | 'promise' | 'node' | 'vue';
|
|
4
8
|
interface OxlintOverride {
|
|
5
9
|
files: string[];
|
|
6
|
-
plugins?:
|
|
10
|
+
plugins?: OxlintPlugin[];
|
|
7
11
|
rules?: Record<string, OxlintRuleEntry>;
|
|
8
12
|
env?: Record<string, boolean>;
|
|
9
13
|
}
|
|
10
14
|
interface OxlintConfig {
|
|
11
15
|
$schema?: string;
|
|
12
|
-
plugins?:
|
|
16
|
+
plugins?: OxlintPlugin[];
|
|
13
17
|
categories?: Record<string, OxlintSeverity>;
|
|
14
18
|
rules?: Record<string, OxlintRuleEntry>;
|
|
15
19
|
overrides?: OxlintOverride[];
|
|
@@ -22,15 +26,17 @@ interface OxlintConfig {
|
|
|
22
26
|
/**
|
|
23
27
|
* Base preset, ported from `@jabworks/eslint-plugin` configs.base.
|
|
24
28
|
*
|
|
25
|
-
* Dropped (no oxlint equivalent as of 1.
|
|
26
|
-
*
|
|
27
|
-
* no-unreachable-loop, camelcase, prefer-arrow-callback, no-undef-init,
|
|
29
|
+
* Dropped (no oxlint equivalent as of 1.73): no-octal-escape,
|
|
30
|
+
* object-shorthand, camelcase, no-undef-init,
|
|
28
31
|
* import/newline-after-import, import/no-extraneous-dependencies,
|
|
29
32
|
* import/no-relative-packages, import/no-useless-path-segments,
|
|
30
33
|
* import/no-deprecated, simple-import-sort/*, eslint-comments/*, @stylistic/*.
|
|
31
34
|
*/
|
|
32
35
|
declare const base: OxlintConfig;
|
|
33
36
|
//#endregion
|
|
37
|
+
//#region src/configs/library.d.ts
|
|
38
|
+
declare const library: OxlintConfig;
|
|
39
|
+
//#endregion
|
|
34
40
|
//#region src/configs/next.d.ts
|
|
35
41
|
/**
|
|
36
42
|
* Next.js preset, ported from `@jabworks/eslint-plugin` configs.next.
|
|
@@ -39,6 +45,9 @@ declare const base: OxlintConfig;
|
|
|
39
45
|
*/
|
|
40
46
|
declare const next: OxlintConfig;
|
|
41
47
|
//#endregion
|
|
48
|
+
//#region src/configs/node.d.ts
|
|
49
|
+
declare const node: OxlintConfig;
|
|
50
|
+
//#endregion
|
|
42
51
|
//#region src/configs/react.d.ts
|
|
43
52
|
declare const react: OxlintConfig;
|
|
44
53
|
//#endregion
|
|
@@ -64,9 +73,11 @@ declare const config: {
|
|
|
64
73
|
typescript: OxlintConfig;
|
|
65
74
|
react: OxlintConfig;
|
|
66
75
|
next: OxlintConfig;
|
|
76
|
+
node: OxlintConfig;
|
|
77
|
+
library: OxlintConfig;
|
|
67
78
|
vitest: OxlintConfig;
|
|
68
79
|
};
|
|
69
80
|
};
|
|
70
81
|
//#endregion
|
|
71
|
-
export { type OxlintConfig, type OxlintOverride, type OxlintRuleEntry, type OxlintSeverity, base, config, mergeConfigs, next, react, typescript, vitest };
|
|
82
|
+
export { type OxlintConfig, type OxlintOverride, type OxlintPlugin, type OxlintRuleEntry, type OxlintSeverity, base, config, library, mergeConfigs, next, node, react, typescript, vitest };
|
|
72
83
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/configs/base.ts","../src/configs/next.ts","../src/configs/react.ts","../src/configs/typescript.ts","../src/configs/vitest.ts","../src/lib/merge.ts","../src/index.ts"],"mappings":";KAAY,cAAA;AAAA,KAEA,eAAA,GAAkB,cAAA,IAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/configs/base.ts","../src/configs/library.ts","../src/configs/next.ts","../src/configs/node.ts","../src/configs/react.ts","../src/configs/typescript.ts","../src/configs/vitest.ts","../src/lib/merge.ts","../src/index.ts"],"mappings":";KAAY,cAAA;AAAA,KAEA,eAAA,GAAkB,cAAA,IAAkB,cAAc;;;;KAKlD,YAAA;AAAA,UAiBK,cAAA;EACf,KAAA;EACA,OAAA,GAAU,YAAA;EACV,KAAA,GAAQ,MAAA,SAAe,eAAA;EACvB,GAAA,GAAM,MAAA;AAAA;AAAA,UAGS,YAAA;EACf,OAAA;EACA,OAAA,GAAU,YAAA;EACV,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,KAAA,GAAQ,MAAA,SAAe,eAAA;EACvB,SAAA,GAAY,cAAA;EACZ,cAAA;EACA,GAAA,GAAM,MAAA;EACN,QAAA,GAAW,MAAA;AAAA;;;AAvCb;;;;AAA0B;AAE1B;;;;AAFA,cCWM,IAAA,EAAM,YA4GX;;;cCtGK,OAAA,EAAS,YAAqD;;;AFjBpE;;;;AAA0B;AAA1B,cGSM,IAAA,EAAM,YAoCV;;;cCjBI,IAAA,EAAM,YAAkD;;;cCUxD,KAAA,EAAO,YAAmD;;;cCK1D,UAAA,EAAY,YAAkD;;;cCrB9D,MAAA,EAAQ,YAKb;;;AP3BD;;;;AAA0B;AAE1B;AAFA,cQQa,YAAA,MAAmB,OAAA,EAAS,YAAA,OAAiB,YAqBzD;;;cClBY,MAAA;;UAUZ,YAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Base preset, ported from `@jabworks/eslint-plugin` configs.base.
|
|
4
4
|
*
|
|
5
|
-
* Dropped (no oxlint equivalent as of 1.
|
|
6
|
-
*
|
|
7
|
-
* no-unreachable-loop, camelcase, prefer-arrow-callback, no-undef-init,
|
|
5
|
+
* Dropped (no oxlint equivalent as of 1.73): no-octal-escape,
|
|
6
|
+
* object-shorthand, camelcase, no-undef-init,
|
|
8
7
|
* import/newline-after-import, import/no-extraneous-dependencies,
|
|
9
8
|
* import/no-relative-packages, import/no-useless-path-segments,
|
|
10
9
|
* import/no-deprecated, simple-import-sort/*, eslint-comments/*, @stylistic/*.
|
|
@@ -29,6 +28,7 @@ const base = {
|
|
|
29
28
|
"eslint/no-extra-bind": "error",
|
|
30
29
|
"eslint/no-extra-label": "error",
|
|
31
30
|
"eslint/no-implicit-coercion": "error",
|
|
31
|
+
"eslint/no-implied-eval": "error",
|
|
32
32
|
"eslint/no-iterator": "error",
|
|
33
33
|
"eslint/no-labels": "error",
|
|
34
34
|
"eslint/no-lone-blocks": "error",
|
|
@@ -45,6 +45,7 @@ const base = {
|
|
|
45
45
|
"eslint/no-useless-concat": "error",
|
|
46
46
|
"eslint/no-useless-return": "warn",
|
|
47
47
|
"eslint/prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
|
|
48
|
+
"eslint/prefer-regex-literals": "error",
|
|
48
49
|
"eslint/yoda": "warn",
|
|
49
50
|
"eslint/no-useless-computed-key": "warn",
|
|
50
51
|
"eslint/no-useless-rename": "warn",
|
|
@@ -59,6 +60,7 @@ const base = {
|
|
|
59
60
|
"eslint/no-constant-binary-expression": "error",
|
|
60
61
|
"eslint/no-promise-executor-return": "error",
|
|
61
62
|
"eslint/no-template-curly-in-string": "error",
|
|
63
|
+
"eslint/no-unreachable-loop": "error",
|
|
62
64
|
"eslint/func-names": ["error", "as-needed"],
|
|
63
65
|
"eslint/new-cap": ["error", { capIsNew: false }],
|
|
64
66
|
"eslint/no-array-constructor": "error",
|
|
@@ -67,6 +69,7 @@ const base = {
|
|
|
67
69
|
"eslint/no-multi-assign": "error",
|
|
68
70
|
"eslint/no-nested-ternary": "error",
|
|
69
71
|
"eslint/no-unneeded-ternary": "error",
|
|
72
|
+
"eslint/prefer-arrow-callback": "warn",
|
|
70
73
|
"eslint/prefer-object-spread": "warn",
|
|
71
74
|
"eslint/no-label-var": "error",
|
|
72
75
|
"eslint/no-unused-vars": ["error", {
|
|
@@ -141,6 +144,7 @@ const typescript = mergeConfigs(base, {
|
|
|
141
144
|
fixStyle: "inline-type-imports",
|
|
142
145
|
prefer: "type-imports"
|
|
143
146
|
}],
|
|
147
|
+
"typescript/method-signature-style": "warn",
|
|
144
148
|
"typescript/no-misused-promises": ["error", { checksVoidReturn: { attributes: false } }],
|
|
145
149
|
"typescript/no-redundant-type-constituents": "warn",
|
|
146
150
|
"typescript/no-unnecessary-qualifier": "warn",
|
|
@@ -154,6 +158,7 @@ const typescript = mergeConfigs(base, {
|
|
|
154
158
|
"eslint/no-useless-constructor": "error"
|
|
155
159
|
}
|
|
156
160
|
});
|
|
161
|
+
const library = mergeConfigs(typescript, { rules: { "import/no-cycle": "error" } });
|
|
157
162
|
//#endregion
|
|
158
163
|
//#region src/configs/vitest.ts
|
|
159
164
|
/**
|
|
@@ -243,6 +248,19 @@ const next = mergeConfigs(react, {
|
|
|
243
248
|
}],
|
|
244
249
|
ignorePatterns: [".next/**"]
|
|
245
250
|
});
|
|
251
|
+
const node = mergeConfigs(typescript, {
|
|
252
|
+
plugins: ["node"],
|
|
253
|
+
env: { node: true },
|
|
254
|
+
rules: {
|
|
255
|
+
"node/no-process-exit": "error",
|
|
256
|
+
"node/no-path-concat": "error",
|
|
257
|
+
"node/no-new-require": "error",
|
|
258
|
+
"node/no-exports-assign": "error",
|
|
259
|
+
"node/handle-callback-err": "error",
|
|
260
|
+
"node/no-process-env": "off"
|
|
261
|
+
},
|
|
262
|
+
overrides: [vitestOverride]
|
|
263
|
+
});
|
|
246
264
|
//#endregion
|
|
247
265
|
//#region src/index.ts
|
|
248
266
|
const config = { configs: {
|
|
@@ -250,9 +268,11 @@ const config = { configs: {
|
|
|
250
268
|
typescript,
|
|
251
269
|
react,
|
|
252
270
|
next,
|
|
271
|
+
node,
|
|
272
|
+
library,
|
|
253
273
|
vitest
|
|
254
274
|
} };
|
|
255
275
|
//#endregion
|
|
256
|
-
export { base, config, mergeConfigs, next, react, typescript, vitest };
|
|
276
|
+
export { base, config, library, mergeConfigs, next, node, react, typescript, vitest };
|
|
257
277
|
|
|
258
278
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/configs/base.ts","../src/lib/merge.ts","../src/configs/typescript.ts","../src/configs/vitest.ts","../src/configs/react.ts","../src/configs/next.ts","../src/index.ts"],"sourcesContent":["import type { OxlintConfig } from '../types.js';\n\n/**\n * Base preset, ported from `@jabworks/eslint-plugin` configs.base.\n *\n * Dropped (no oxlint equivalent as of 1.58): no-floating-decimal,\n * no-implied-eval, no-octal-escape, prefer-regex-literals, object-shorthand,\n * no-unreachable-loop, camelcase, prefer-arrow-callback, no-undef-init,\n * import/newline-after-import, import/no-extraneous-dependencies,\n * import/no-relative-packages, import/no-useless-path-segments,\n * import/no-deprecated, simple-import-sort/*, eslint-comments/*, @stylistic/*.\n */\nconst base: OxlintConfig = {\n plugins: ['import', 'unicorn'],\n categories: {\n correctness: 'error',\n },\n env: {\n builtin: true,\n },\n rules: {\n // Best practices\n 'eslint/array-callback-return': ['error', { allowImplicit: true }],\n 'eslint/block-scoped-var': 'error',\n 'eslint/curly': ['warn', 'multi-line'],\n 'eslint/default-case-last': 'error',\n 'eslint/eqeqeq': 'error',\n 'eslint/grouped-accessor-pairs': 'error',\n 'eslint/no-alert': 'error',\n 'eslint/no-caller': 'error',\n 'eslint/no-constructor-return': 'error',\n 'eslint/no-else-return': 'warn',\n 'eslint/no-eval': 'error',\n 'eslint/no-extend-native': 'error',\n 'eslint/no-extra-bind': 'error',\n 'eslint/no-extra-label': 'error',\n 'eslint/no-implicit-coercion': 'error',\n 'eslint/no-iterator': 'error',\n 'eslint/no-labels': 'error',\n 'eslint/no-lone-blocks': 'error',\n 'eslint/no-new': 'error',\n 'eslint/no-new-func': 'error',\n 'eslint/no-new-wrappers': 'error',\n 'eslint/no-param-reassign': 'error',\n 'eslint/no-proto': 'error',\n 'eslint/no-return-assign': 'error',\n 'eslint/no-script-url': 'error',\n 'eslint/no-self-compare': 'error',\n 'eslint/no-sequences': 'error',\n 'eslint/no-useless-call': 'error',\n 'eslint/no-useless-concat': 'error',\n 'eslint/no-useless-return': 'warn',\n 'eslint/prefer-promise-reject-errors': ['error', { allowEmptyReject: true }],\n 'eslint/yoda': 'warn',\n // ES6\n 'eslint/no-useless-computed-key': 'warn',\n 'eslint/no-useless-rename': 'warn',\n 'eslint/no-var': 'error',\n 'eslint/prefer-const': 'warn',\n 'eslint/prefer-numeric-literals': 'error',\n 'eslint/prefer-rest-params': 'error',\n 'eslint/prefer-spread': 'error',\n 'eslint/prefer-template': 'warn',\n 'eslint/symbol-description': 'error',\n // Possible errors\n 'eslint/no-console': ['warn', { allow: ['error', 'warn'] }],\n 'eslint/no-constant-binary-expression': 'error',\n 'eslint/no-promise-executor-return': 'error',\n 'eslint/no-template-curly-in-string': 'error',\n // Stylistic\n 'eslint/func-names': ['error', 'as-needed'],\n 'eslint/new-cap': ['error', { capIsNew: false }],\n 'eslint/no-array-constructor': 'error',\n 'eslint/no-bitwise': 'error',\n 'eslint/no-lonely-if': 'warn',\n 'eslint/no-multi-assign': 'error',\n 'eslint/no-nested-ternary': 'error',\n 'eslint/no-unneeded-ternary': 'error',\n 'eslint/prefer-object-spread': 'warn',\n // Variables\n 'eslint/no-label-var': 'error',\n 'eslint/no-unused-vars': [\n 'error',\n {\n args: 'after-used',\n argsIgnorePattern: '^_',\n ignoreRestSiblings: false,\n vars: 'all',\n varsIgnorePattern: '^_',\n },\n ],\n // Import\n 'import/first': 'error',\n 'import/no-absolute-path': 'error',\n 'import/no-default-export': 'error',\n 'import/no-mutable-exports': 'error',\n 'import/no-self-import': 'error',\n // This rule is the most taxing on performance, so we disable it by default.\n 'import/no-cycle': 'off',\n 'import/named': 'off',\n // Unicorn\n 'unicorn/filename-case': ['error', { case: 'kebabCase' }],\n },\n ignorePatterns: [\n 'dist/**',\n 'build/**',\n 'out/**',\n 'coverage/**',\n 'node_modules/**',\n 'eslint.config.js',\n 'eslint.config.mjs',\n 'eslint.config.cjs',\n '*.config.js',\n '*.config.mjs',\n '*.config.cjs',\n ],\n};\n\nexport default base;\n","import type { OxlintConfig } from '../types.js';\n\n/**\n * Merge oxlint configs left-to-right into a single standalone config.\n *\n * Plugins and ignorePatterns are unioned, categories/rules/env/settings are\n * shallow-merged (later configs win), and overrides are concatenated.\n */\nexport const mergeConfigs = (...configs: OxlintConfig[]): OxlintConfig => {\n const result: OxlintConfig = {};\n\n for (const config of configs) {\n if (config.plugins) result.plugins = [...new Set([...(result.plugins ?? []), ...config.plugins])];\n\n if (config.categories) result.categories = { ...result.categories, ...config.categories };\n\n if (config.rules) result.rules = { ...result.rules, ...config.rules };\n\n if (config.env) result.env = { ...result.env, ...config.env };\n\n if (config.settings) result.settings = { ...result.settings, ...config.settings };\n\n if (config.overrides) result.overrides = [...(result.overrides ?? []), ...config.overrides];\n\n if (config.ignorePatterns)\n result.ignorePatterns = [...new Set([...(result.ignorePatterns ?? []), ...config.ignorePatterns])];\n }\n\n return result;\n};\n","import { mergeConfigs } from '../lib/merge.js';\nimport type { OxlintConfig } from '../types.js';\nimport base from './base.js';\n\n/**\n * TypeScript preset, ported from `@jabworks/eslint-plugin` configs.typescript.\n *\n * Type-aware rules (consistent-type-exports, no-misused-promises,\n * no-redundant-type-constituents, no-unnecessary-qualifier,\n * prefer-regexp-exec, require-array-sort-compare,\n * restrict-template-expressions, switch-exhaustiveness-check) only run when\n * `oxlint-tsgolint` is installed and oxlint runs with `--type-aware`.\n *\n * Dropped (no oxlint equivalent as of 1.58): method-signature-style,\n * naming-convention.\n */\nexport const typescriptRules: OxlintConfig = {\n plugins: ['typescript'],\n rules: {\n 'typescript/consistent-type-exports': ['warn', { fixMixedExportsWithInlineTypeSpecifier: true }],\n 'typescript/consistent-type-imports': [\n 'warn',\n {\n disallowTypeAnnotations: true,\n fixStyle: 'inline-type-imports',\n prefer: 'type-imports',\n },\n ],\n 'typescript/no-misused-promises': ['error', { checksVoidReturn: { attributes: false } }],\n 'typescript/no-redundant-type-constituents': 'warn',\n 'typescript/no-unnecessary-qualifier': 'warn',\n 'typescript/prefer-regexp-exec': 'warn',\n 'typescript/require-array-sort-compare': ['error', { ignoreStringArrays: true }],\n 'typescript/restrict-template-expressions': ['error', { allowNumber: true }],\n 'typescript/switch-exhaustiveness-check': ['warn', { considerDefaultExhaustiveForUnions: true }],\n 'typescript/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }],\n // Extension rules: oxlint's eslint/* implementations handle TS sources.\n 'eslint/default-param-last': 'error',\n 'eslint/no-loop-func': 'error',\n 'eslint/no-useless-constructor': 'error',\n },\n};\n\nconst typescript: OxlintConfig = mergeConfigs(base, typescriptRules);\n\nexport default typescript;\n","import type { OxlintConfig, OxlintOverride } from '../types.js';\n\n/**\n * Vitest preset, ported from `@jabworks/eslint-plugin` configs.vitest.\n * Scoped to test files via an override, like the original flat config.\n */\nexport const vitestOverride: OxlintOverride = {\n files: ['**/*.test.{js,ts,mjs,cjs,jsx,tsx}', '**/__tests__/**', '**/tests/**'],\n plugins: ['vitest'],\n env: {\n node: true,\n vitest: true,\n },\n rules: {\n 'vitest/max-nested-describe': ['error', { max: 3 }],\n 'vitest/no-commented-out-tests': 'error',\n 'vitest/no-disabled-tests': 'error',\n 'vitest/no-focused-tests': 'error',\n 'vitest/no-identical-title': 'error',\n },\n};\n\nconst vitest: OxlintConfig = {\n categories: {\n correctness: 'error',\n },\n overrides: [vitestOverride],\n};\n\nexport default vitest;\n","import { mergeConfigs } from '../lib/merge.js';\nimport type { OxlintConfig } from '../types.js';\nimport typescript from './typescript.js';\nimport { vitestOverride } from './vitest.js';\n\n/**\n * React preset, ported from `@jabworks/eslint-plugin` configs.react.\n * Includes the react-hooks rules (folded into oxlint's react plugin) and the\n * vitest override for test files.\n *\n * Dropped (no oxlint equivalent as of 1.58): function-component-definition,\n * hook-use-state, jsx-no-leaked-render, jsx-sort-props,\n * no-unstable-nested-components.\n */\nexport const reactRules: OxlintConfig = {\n plugins: ['react', 'jsx-a11y'],\n env: {\n browser: true,\n },\n rules: {\n 'react/react-in-jsx-scope': 'off',\n 'react/button-has-type': 'warn',\n 'react/jsx-boolean-value': 'warn',\n 'react/jsx-curly-brace-presence': 'warn',\n 'react/jsx-fragments': 'warn',\n 'react/jsx-no-target-blank': ['error', { allowReferrer: true }],\n 'react/jsx-no-useless-fragment': ['warn', { allowExpressions: true }],\n 'react/jsx-pascal-case': 'warn',\n 'react/no-array-index-key': 'warn',\n 'react/self-closing-comp': 'warn',\n // react-hooks rules live under oxlint's react plugin.\n 'react/rules-of-hooks': 'error',\n 'react/exhaustive-deps': 'warn',\n 'jsx-a11y/no-autofocus': 'off',\n },\n overrides: [vitestOverride],\n};\n\nconst react: OxlintConfig = mergeConfigs(typescript, reactRules);\n\nexport default react;\n","import { mergeConfigs } from '../lib/merge.js';\nimport type { OxlintConfig } from '../types.js';\nimport react from './react.js';\n\n/**\n * Next.js preset, ported from `@jabworks/eslint-plugin` configs.next.\n * The nextjs plugin's recommended/core-web-vitals rules are enabled through\n * the `correctness` category.\n */\nconst next: OxlintConfig = mergeConfigs(react, {\n plugins: ['nextjs'],\n overrides: [\n {\n files: [\n '*.config.js',\n '*.config.mjs',\n '*.config.cjs',\n '*.config.ts',\n '**/*.d.ts',\n '**/*.stories.ts',\n '**/*.stories.tsx',\n 'app/**/*error.tsx',\n 'app/**/layout.tsx',\n 'app/**/not-found.tsx',\n 'app/**/opengraph-image.tsx',\n 'app/**/page.tsx',\n 'app/apple-icon.tsx',\n 'app/robots.ts',\n 'app/sitemap.ts',\n 'next.config.mjs',\n 'src/app/**/*error.tsx',\n 'src/app/**/layout.tsx',\n 'src/app/**/not-found.tsx',\n 'src/app/**/opengraph-image.tsx',\n 'src/app/**/page.tsx',\n 'src/app/apple-icon.tsx',\n 'src/app/robots.ts',\n 'src/app/sitemap.ts',\n ],\n rules: {\n 'import/no-default-export': 'off',\n },\n },\n ],\n ignorePatterns: ['.next/**'],\n});\n\nexport default next;\n","import base from './configs/base.js';\nimport next from './configs/next.js';\nimport react from './configs/react.js';\nimport typescript from './configs/typescript.js';\nimport vitest from './configs/vitest.js';\n\nexport { mergeConfigs } from './lib/merge.js';\nexport type { OxlintConfig, OxlintOverride, OxlintRuleEntry, OxlintSeverity } from './types.js';\n\nexport const config = {\n configs: {\n base,\n typescript,\n react,\n next,\n vitest,\n },\n};\n\nexport { base, next, react, typescript, vitest };\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,OAAqB;CACzB,SAAS,CAAC,UAAU,UAAU;CAC9B,YAAY,EACV,aAAa,SACd;CACD,KAAK,EACH,SAAS,MACV;CACD,OAAO;EAEL,gCAAgC,CAAC,SAAS,EAAE,eAAe,MAAM,CAAC;EAClE,2BAA2B;EAC3B,gBAAgB,CAAC,QAAQ,aAAa;EACtC,4BAA4B;EAC5B,iBAAiB;EACjB,iCAAiC;EACjC,mBAAmB;EACnB,oBAAoB;EACpB,gCAAgC;EAChC,yBAAyB;EACzB,kBAAkB;EAClB,2BAA2B;EAC3B,wBAAwB;EACxB,yBAAyB;EACzB,+BAA+B;EAC/B,sBAAsB;EACtB,oBAAoB;EACpB,yBAAyB;EACzB,iBAAiB;EACjB,sBAAsB;EACtB,0BAA0B;EAC1B,4BAA4B;EAC5B,mBAAmB;EACnB,2BAA2B;EAC3B,wBAAwB;EACxB,0BAA0B;EAC1B,uBAAuB;EACvB,0BAA0B;EAC1B,4BAA4B;EAC5B,4BAA4B;EAC5B,uCAAu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3B,6BAA6B;EAC9B;CACF;AAED,MAAM,SAAuB;CAC3B,YAAY,EACV,aAAa,SACd;CACD,WAAW,CAAC,eAAe;CAC5B;ACWD,MAAM,QAAsB,aAAa,YAxBD;CACtC,SAAS,CAAC,SAAS,WAAW;CAC9B,KAAK,EACH,SAAS,MACV;CACD,OAAO;EACL,4BAA4B;EAC5B,yBAAyB;EACzB,2BAA2B;EAC3B,kCAAkC;EAClC,uBAAuB;EACvB,6BAA6B,CAAC,SAAS,EAAE,eAAe,MAAM,CAAC;EAC/D,iCAAiC,CAAC,QAAQ,EAAE,kBAAkB,MAAM,CAAC;EACrE,yBAAyB;EACzB,4BAA4B;EAC5B,2BAA2B;EAE3B,wBAAwB;EACxB,yBAAyB;EACzB,yBAAyB;EAC1B;CACD,WAAW,CAAC,eAAe;CAC5B,CAE+D;;;;;;;;AC7BhE,MAAM,OAAqB,aAAa,OAAO;CAC7C,SAAS,CAAC,SAAS;CACnB,WAAW,CACT;EACE,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD,OAAO,EACL,4BAA4B,OAC7B;EACF,CACF;CACD,gBAAgB,CAAC,WAAW;CAC7B,CAAC;;;ACpCF,MAAa,SAAS,EACpB,SAAS;CACP;CACA;CACA;CACA;CACA;CACD,EACF"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/configs/base.ts","../src/lib/merge.ts","../src/configs/typescript.ts","../src/configs/library.ts","../src/configs/vitest.ts","../src/configs/react.ts","../src/configs/next.ts","../src/configs/node.ts","../src/index.ts"],"sourcesContent":["import type { OxlintConfig } from '../types.js';\n\n/**\n * Base preset, ported from `@jabworks/eslint-plugin` configs.base.\n *\n * Dropped (no oxlint equivalent as of 1.73): no-octal-escape,\n * object-shorthand, camelcase, no-undef-init,\n * import/newline-after-import, import/no-extraneous-dependencies,\n * import/no-relative-packages, import/no-useless-path-segments,\n * import/no-deprecated, simple-import-sort/*, eslint-comments/*, @stylistic/*.\n */\nconst base: OxlintConfig = {\n plugins: ['import', 'unicorn'],\n categories: {\n correctness: 'error',\n },\n env: {\n builtin: true,\n },\n rules: {\n // Best practices\n 'eslint/array-callback-return': ['error', { allowImplicit: true }],\n 'eslint/block-scoped-var': 'error',\n 'eslint/curly': ['warn', 'multi-line'],\n 'eslint/default-case-last': 'error',\n 'eslint/eqeqeq': 'error',\n 'eslint/grouped-accessor-pairs': 'error',\n 'eslint/no-alert': 'error',\n 'eslint/no-caller': 'error',\n 'eslint/no-constructor-return': 'error',\n 'eslint/no-else-return': 'warn',\n 'eslint/no-eval': 'error',\n 'eslint/no-extend-native': 'error',\n 'eslint/no-extra-bind': 'error',\n 'eslint/no-extra-label': 'error',\n 'eslint/no-implicit-coercion': 'error',\n 'eslint/no-implied-eval': 'error',\n 'eslint/no-iterator': 'error',\n 'eslint/no-labels': 'error',\n 'eslint/no-lone-blocks': 'error',\n 'eslint/no-new': 'error',\n 'eslint/no-new-func': 'error',\n 'eslint/no-new-wrappers': 'error',\n 'eslint/no-param-reassign': 'error',\n 'eslint/no-proto': 'error',\n 'eslint/no-return-assign': 'error',\n 'eslint/no-script-url': 'error',\n 'eslint/no-self-compare': 'error',\n 'eslint/no-sequences': 'error',\n 'eslint/no-useless-call': 'error',\n 'eslint/no-useless-concat': 'error',\n 'eslint/no-useless-return': 'warn',\n 'eslint/prefer-promise-reject-errors': ['error', { allowEmptyReject: true }],\n 'eslint/prefer-regex-literals': 'error',\n 'eslint/yoda': 'warn',\n // ES6\n 'eslint/no-useless-computed-key': 'warn',\n 'eslint/no-useless-rename': 'warn',\n 'eslint/no-var': 'error',\n 'eslint/prefer-const': 'warn',\n 'eslint/prefer-numeric-literals': 'error',\n 'eslint/prefer-rest-params': 'error',\n 'eslint/prefer-spread': 'error',\n 'eslint/prefer-template': 'warn',\n 'eslint/symbol-description': 'error',\n // Possible errors\n 'eslint/no-console': ['warn', { allow: ['error', 'warn'] }],\n 'eslint/no-constant-binary-expression': 'error',\n 'eslint/no-promise-executor-return': 'error',\n 'eslint/no-template-curly-in-string': 'error',\n 'eslint/no-unreachable-loop': 'error',\n // Stylistic\n 'eslint/func-names': ['error', 'as-needed'],\n 'eslint/new-cap': ['error', { capIsNew: false }],\n 'eslint/no-array-constructor': 'error',\n 'eslint/no-bitwise': 'error',\n 'eslint/no-lonely-if': 'warn',\n 'eslint/no-multi-assign': 'error',\n 'eslint/no-nested-ternary': 'error',\n 'eslint/no-unneeded-ternary': 'error',\n 'eslint/prefer-arrow-callback': 'warn',\n 'eslint/prefer-object-spread': 'warn',\n // Variables\n 'eslint/no-label-var': 'error',\n 'eslint/no-unused-vars': [\n 'error',\n {\n args: 'after-used',\n argsIgnorePattern: '^_',\n ignoreRestSiblings: false,\n vars: 'all',\n varsIgnorePattern: '^_',\n },\n ],\n // Import\n 'import/first': 'error',\n 'import/no-absolute-path': 'error',\n 'import/no-default-export': 'error',\n 'import/no-mutable-exports': 'error',\n 'import/no-self-import': 'error',\n // This rule is the most taxing on performance, so we disable it by default.\n 'import/no-cycle': 'off',\n 'import/named': 'off',\n // Unicorn\n 'unicorn/filename-case': ['error', { case: 'kebabCase' }],\n },\n ignorePatterns: [\n 'dist/**',\n 'build/**',\n 'out/**',\n 'coverage/**',\n 'node_modules/**',\n 'eslint.config.js',\n 'eslint.config.mjs',\n 'eslint.config.cjs',\n '*.config.js',\n '*.config.mjs',\n '*.config.cjs',\n ],\n};\n\nexport default base;\n","import type { OxlintConfig } from '../types.js';\n\n/**\n * Merge oxlint configs left-to-right into a single standalone config.\n *\n * Plugins and ignorePatterns are unioned, categories/rules/env/settings are\n * shallow-merged (later configs win), and overrides are concatenated.\n */\nexport const mergeConfigs = (...configs: OxlintConfig[]): OxlintConfig => {\n const result: OxlintConfig = {};\n\n for (const config of configs) {\n if (config.plugins) result.plugins = [...new Set([...(result.plugins ?? []), ...config.plugins])];\n\n if (config.categories) result.categories = { ...result.categories, ...config.categories };\n\n if (config.rules) result.rules = { ...result.rules, ...config.rules };\n\n if (config.env) result.env = { ...result.env, ...config.env };\n\n if (config.settings) result.settings = { ...result.settings, ...config.settings };\n\n if (config.overrides) result.overrides = [...(result.overrides ?? []), ...config.overrides];\n\n if (config.ignorePatterns)\n result.ignorePatterns = [...new Set([...(result.ignorePatterns ?? []), ...config.ignorePatterns])];\n }\n\n return result;\n};\n","import { mergeConfigs } from '../lib/merge.js';\nimport type { OxlintConfig } from '../types.js';\nimport base from './base.js';\n\n/**\n * TypeScript preset, ported from `@jabworks/eslint-plugin` configs.typescript.\n *\n * Type-aware rules (consistent-type-exports, no-misused-promises,\n * no-redundant-type-constituents, no-unnecessary-qualifier,\n * prefer-regexp-exec, require-array-sort-compare,\n * restrict-template-expressions, switch-exhaustiveness-check) only run when\n * `oxlint-tsgolint` is installed and oxlint runs with `--type-aware`.\n *\n * Dropped (no oxlint equivalent as of 1.73): naming-convention.\n */\nexport const typescriptRules: OxlintConfig = {\n plugins: ['typescript'],\n rules: {\n 'typescript/consistent-type-exports': ['warn', { fixMixedExportsWithInlineTypeSpecifier: true }],\n 'typescript/consistent-type-imports': [\n 'warn',\n {\n disallowTypeAnnotations: true,\n fixStyle: 'inline-type-imports',\n prefer: 'type-imports',\n },\n ],\n 'typescript/method-signature-style': 'warn',\n 'typescript/no-misused-promises': ['error', { checksVoidReturn: { attributes: false } }],\n 'typescript/no-redundant-type-constituents': 'warn',\n 'typescript/no-unnecessary-qualifier': 'warn',\n 'typescript/prefer-regexp-exec': 'warn',\n 'typescript/require-array-sort-compare': ['error', { ignoreStringArrays: true }],\n 'typescript/restrict-template-expressions': ['error', { allowNumber: true }],\n 'typescript/switch-exhaustiveness-check': ['warn', { considerDefaultExhaustiveForUnions: true }],\n 'typescript/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }],\n // Extension rules: oxlint's eslint/* implementations handle TS sources.\n 'eslint/default-param-last': 'error',\n 'eslint/no-loop-func': 'error',\n 'eslint/no-useless-constructor': 'error',\n },\n};\n\nconst typescript: OxlintConfig = mergeConfigs(base, typescriptRules);\n\nexport default typescript;\n","import { mergeConfigs } from '../lib/merge.js';\nimport type { OxlintConfig } from '../types.js';\nimport typescript from './typescript.js';\n\n/**\n * Framework-agnostic library preset (e.g. utility libraries, shared packages).\n *\n * No env globals — libraries should be environment-agnostic.\n * Enables import/no-cycle (disabled in base for performance) since library\n * consumers depend on clean, tree-shakeable module graphs.\n */\nexport const libraryRules: OxlintConfig = {\n rules: {\n 'import/no-cycle': 'error',\n },\n};\n\nconst library: OxlintConfig = mergeConfigs(typescript, libraryRules);\n\nexport default library;\n","import type { OxlintConfig, OxlintOverride } from '../types.js';\n\n/**\n * Vitest preset, ported from `@jabworks/eslint-plugin` configs.vitest.\n * Scoped to test files via an override, like the original flat config.\n */\nexport const vitestOverride: OxlintOverride = {\n files: ['**/*.test.{js,ts,mjs,cjs,jsx,tsx}', '**/__tests__/**', '**/tests/**'],\n plugins: ['vitest'],\n env: {\n node: true,\n vitest: true,\n },\n rules: {\n 'vitest/max-nested-describe': ['error', { max: 3 }],\n 'vitest/no-commented-out-tests': 'error',\n 'vitest/no-disabled-tests': 'error',\n 'vitest/no-focused-tests': 'error',\n 'vitest/no-identical-title': 'error',\n },\n};\n\nconst vitest: OxlintConfig = {\n categories: {\n correctness: 'error',\n },\n overrides: [vitestOverride],\n};\n\nexport default vitest;\n","import { mergeConfigs } from '../lib/merge.js';\nimport type { OxlintConfig } from '../types.js';\nimport typescript from './typescript.js';\nimport { vitestOverride } from './vitest.js';\n\n/**\n * React preset, ported from `@jabworks/eslint-plugin` configs.react.\n * Includes the react-hooks rules (folded into oxlint's react plugin) and the\n * vitest override for test files.\n *\n * Dropped (no oxlint equivalent as of 1.73): function-component-definition,\n * hook-use-state, jsx-no-leaked-render, jsx-sort-props,\n * no-unstable-nested-components.\n */\nexport const reactRules: OxlintConfig = {\n plugins: ['react', 'jsx-a11y'],\n env: {\n browser: true,\n },\n rules: {\n 'react/react-in-jsx-scope': 'off',\n 'react/button-has-type': 'warn',\n 'react/jsx-boolean-value': 'warn',\n 'react/jsx-curly-brace-presence': 'warn',\n 'react/jsx-fragments': 'warn',\n 'react/jsx-no-target-blank': ['error', { allowReferrer: true }],\n 'react/jsx-no-useless-fragment': ['warn', { allowExpressions: true }],\n 'react/jsx-pascal-case': 'warn',\n 'react/no-array-index-key': 'warn',\n 'react/self-closing-comp': 'warn',\n // react-hooks rules live under oxlint's react plugin.\n 'react/rules-of-hooks': 'error',\n 'react/exhaustive-deps': 'warn',\n 'jsx-a11y/no-autofocus': 'off',\n },\n overrides: [vitestOverride],\n};\n\nconst react: OxlintConfig = mergeConfigs(typescript, reactRules);\n\nexport default react;\n","import { mergeConfigs } from '../lib/merge.js';\nimport type { OxlintConfig } from '../types.js';\nimport react from './react.js';\n\n/**\n * Next.js preset, ported from `@jabworks/eslint-plugin` configs.next.\n * The nextjs plugin's recommended/core-web-vitals rules are enabled through\n * the `correctness` category.\n */\nconst next: OxlintConfig = mergeConfigs(react, {\n plugins: ['nextjs'],\n overrides: [\n {\n files: [\n '*.config.js',\n '*.config.mjs',\n '*.config.cjs',\n '*.config.ts',\n '**/*.d.ts',\n '**/*.stories.ts',\n '**/*.stories.tsx',\n 'app/**/*error.tsx',\n 'app/**/layout.tsx',\n 'app/**/not-found.tsx',\n 'app/**/opengraph-image.tsx',\n 'app/**/page.tsx',\n 'app/apple-icon.tsx',\n 'app/robots.ts',\n 'app/sitemap.ts',\n 'next.config.mjs',\n 'src/app/**/*error.tsx',\n 'src/app/**/layout.tsx',\n 'src/app/**/not-found.tsx',\n 'src/app/**/opengraph-image.tsx',\n 'src/app/**/page.tsx',\n 'src/app/apple-icon.tsx',\n 'src/app/robots.ts',\n 'src/app/sitemap.ts',\n ],\n rules: {\n 'import/no-default-export': 'off',\n },\n },\n ],\n ignorePatterns: ['.next/**'],\n});\n\nexport default next;\n","import { mergeConfigs } from '../lib/merge.js';\nimport type { OxlintConfig } from '../types.js';\nimport typescript from './typescript.js';\nimport { vitestOverride } from './vitest.js';\n\n/**\n * Node.js preset, ported from `@jabworks/eslint-plugin` configs.node.\n *\n * Dropped (no oxlint equivalent as of 1.73): n/prefer-promises/fs,\n * n/prefer-promises/dns, n/no-callback-literal, n/prefer-global/*.\n */\nexport const nodeRules: OxlintConfig = {\n plugins: ['node'],\n env: {\n node: true,\n },\n rules: {\n 'node/no-process-exit': 'error',\n 'node/no-path-concat': 'error',\n 'node/no-new-require': 'error',\n 'node/no-exports-assign': 'error',\n 'node/handle-callback-err': 'error',\n // process.env access is allowed — use a secrets manager or dotenv in practice\n 'node/no-process-env': 'off',\n },\n overrides: [vitestOverride],\n};\n\nconst node: OxlintConfig = mergeConfigs(typescript, nodeRules);\n\nexport default node;\n","import base from './configs/base.js';\nimport library from './configs/library.js';\nimport next from './configs/next.js';\nimport node from './configs/node.js';\nimport react from './configs/react.js';\nimport typescript from './configs/typescript.js';\nimport vitest from './configs/vitest.js';\n\nexport { mergeConfigs } from './lib/merge.js';\nexport type { OxlintConfig, OxlintOverride, OxlintPlugin, OxlintRuleEntry, OxlintSeverity } from './types.js';\n\nexport const config = {\n configs: {\n base,\n typescript,\n react,\n next,\n node,\n library,\n vitest,\n },\n};\n\nexport { base, library, next, node, react, typescript, vitest };\n"],"mappings":";;;;;;;;;;AAWA,MAAM,OAAqB;CACzB,SAAS,CAAC,UAAU,SAAS;CAC7B,YAAY,EACV,aAAa,QACf;CACA,KAAK,EACH,SAAS,KACX;CACA,OAAO;EAEL,gCAAgC,CAAC,SAAS,EAAE,eAAe,KAAK,CAAC;EACjE,2BAA2B;EAC3B,gBAAgB,CAAC,QAAQ,YAAY;EACrC,4BAA4B;EAC5B,iBAAiB;EACjB,iCAAiC;EACjC,mBAAmB;EACnB,oBAAoB;EACpB,gCAAgC;EAChC,yBAAyB;EACzB,kBAAkB;EAClB,2BAA2B;EAC3B,wBAAwB;EACxB,yBAAyB;EACzB,+BAA+B;EAC/B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,aAAa,YAAY;CAhBlD,SAAS,CAAC,MAAM;CAChB,KAAK,EACH,MAAM,KACR;CACA,OAAO;EACL,wBAAwB;EACxB,uBAAuB;EACvB,uBAAuB;EACvB,0BAA0B;EAC1B,4BAA4B;EAE5B,uBAAuB;CACzB;CACA,WAAW,CAAC,cAAc;AAGwB,CAAS;;;ACjB7D,MAAa,SAAS,EACpB,SAAS;CACP;CACA;CACA;CACA;CACA;CACA;CACA;AACF,EACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jabworks/oxlint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Opinionated oxlint presets for JS, TS, React, Next.js, and Vitest, ported from @jabworks/eslint-plugin",
|
|
6
6
|
"keywords": [
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"oxlint": "^1.
|
|
39
|
-
"tsdown": "^0.
|
|
40
|
-
"typescript": "^6.0.
|
|
38
|
+
"oxlint": "^1.73.0",
|
|
39
|
+
"tsdown": "^0.22.2",
|
|
40
|
+
"typescript": "^6.0.3",
|
|
41
41
|
"@jabworks/typescript-config": "0.0.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"oxlint": ">=1.
|
|
44
|
+
"oxlint": ">=1.73.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|