@apify/oxlint-config 0.2.6 → 0.2.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/index.d.ts +16 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import type { OxlintConfig } from 'oxlint';
|
|
1
|
+
import type { OxlintConfig as RawOxlintConfig } from 'oxlint';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Re-aliased {@link RawOxlintConfig} owned by this package. Structurally
|
|
5
|
+
* identical to oxlint's `OxlintConfig`, but living in `@apify/oxlint-config`
|
|
6
|
+
* means TypeScript can write a portable name when emitting inferred types
|
|
7
|
+
* for consumer config files (`export default defineConfig({...})`) instead
|
|
8
|
+
* of chasing back to oxlint via pnpm's `.pnpm/...` resolved path — which
|
|
9
|
+
* trips TS2883 ("inferred type cannot be named portably") in IDEs and
|
|
10
|
+
* `--isolatedDeclarations` builds.
|
|
11
|
+
*/
|
|
12
|
+
export interface OxlintConfig extends RawOxlintConfig {}
|
|
2
13
|
|
|
3
14
|
/**
|
|
4
15
|
* Narrow {@link OxlintConfig} so the keys this preset always populates
|
|
@@ -19,9 +30,10 @@ export type ApifyOxlintConfig = OxlintConfig & {
|
|
|
19
30
|
* everything else (`ignorePatterns`, `jsPlugins`, `categories`, …) is
|
|
20
31
|
* passed through unchanged.
|
|
21
32
|
*
|
|
22
|
-
* Returns
|
|
23
|
-
*
|
|
24
|
-
* `composite` / `--isolatedDeclarations`
|
|
33
|
+
* Returns this package's {@link OxlintConfig} alias rather than oxlint's
|
|
34
|
+
* raw type, so consumers can `export default defineConfig({...})` from a
|
|
35
|
+
* `composite` / `--isolatedDeclarations` TS project (or any IDE that runs
|
|
36
|
+
* the same checks) without TS2883.
|
|
25
37
|
*
|
|
26
38
|
* import { defineConfig } from '@apify/oxlint-config';
|
|
27
39
|
*
|