@apify/oxlint-config 0.2.0 → 0.2.1

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 +22 -0
  2. package/package.json +8 -3
package/index.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import type { OxlintConfig } from 'oxlint';
2
+
3
+ /**
4
+ * Narrow {@link OxlintConfig} so the keys this preset always populates
5
+ * (`plugins`, `overrides`, `rules`, `env`) are non-optional. That lets
6
+ * consumers spread them directly without a non-null assertion:
7
+ *
8
+ * export default defineConfig({
9
+ * ...sharedConfig,
10
+ * plugins: [...sharedConfig.plugins, 'react'],
11
+ * overrides: [...sharedConfig.overrides, { ... }],
12
+ * });
13
+ */
14
+ export type ApifyOxlintConfig = OxlintConfig & {
15
+ plugins: NonNullable<OxlintConfig['plugins']>;
16
+ overrides: NonNullable<OxlintConfig['overrides']>;
17
+ rules: NonNullable<OxlintConfig['rules']>;
18
+ env: NonNullable<OxlintConfig['env']>;
19
+ };
20
+
21
+ declare const config: ApifyOxlintConfig;
22
+ export default config;
package/package.json CHANGED
@@ -1,17 +1,22 @@
1
1
  {
2
2
  "name": "@apify/oxlint-config",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Apify oxlint preset to be shared between projects.",
5
5
  "repository": {
6
6
  "url": "https://github.com/apify/apify-oxlint-config"
7
7
  },
8
8
  "type": "module",
9
9
  "main": "index.js",
10
+ "types": "./index.d.ts",
10
11
  "exports": {
11
- ".": "./index.js"
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "default": "./index.js"
15
+ }
12
16
  },
13
17
  "files": [
14
- "index.js"
18
+ "index.js",
19
+ "index.d.ts"
15
20
  ],
16
21
  "scripts": {
17
22
  "test": "echo \"No tests specified\" && exit 0"