@apify/oxlint-config 0.2.6 → 0.2.8
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/index.js +4 -0
- 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
|
*
|
package/index.js
CHANGED
|
@@ -108,6 +108,9 @@ const sharedConfig = {
|
|
|
108
108
|
// notion of chai's `.to.*` modifier chain. Cypress tests live in
|
|
109
109
|
// the same workspaces as vitest tests, so file-glob scoping isn't
|
|
110
110
|
// reliable — disable globally.
|
|
111
|
+
// - require-to-throw-message: opinion (mirrors the already-disabled
|
|
112
|
+
// `jest/require-to-throw-message`); fires hundreds of times in
|
|
113
|
+
// existing test suites with no real signal.
|
|
111
114
|
'vitest/hoisted-apis-on-top': 'off',
|
|
112
115
|
'vitest/require-mock-type-parameters': 'off',
|
|
113
116
|
'vitest/consistent-each-for': 'off',
|
|
@@ -115,6 +118,7 @@ const sharedConfig = {
|
|
|
115
118
|
'vitest/require-local-test-context-for-concurrent-snapshots': 'off',
|
|
116
119
|
'vitest/valid-describe-callback': 'off',
|
|
117
120
|
'vitest/valid-expect': 'off',
|
|
121
|
+
'vitest/require-to-throw-message': 'off',
|
|
118
122
|
'typescript/unbound-method': 'off',
|
|
119
123
|
'typescript/restrict-template-expressions': 'off',
|
|
120
124
|
'typescript/no-useless-default-assignment': 'off',
|