@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.
Files changed (2) hide show
  1. package/index.d.ts +16 -4
  2. 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 `OxlintConfig` (not the narrower `ApifyOxlintConfig`), which is
23
- * re-exported from oxlint, so default-exporting the result is safe under
24
- * `composite` / `--isolatedDeclarations` TypeScript projects.
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
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/oxlint-config",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Apify oxlint preset to be shared between projects.",
5
5
  "repository": {
6
6
  "url": "https://github.com/apify/apify-oxlint-config"