@xsynaptic/eslint-config 2.0.2 → 3.0.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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(pnpm check-types:*)"
5
+ ],
6
+ "deny": [],
7
+ "ask": []
8
+ }
9
+ }
package/eslint.config.ts CHANGED
@@ -1,3 +1,7 @@
1
- import { getConfig } from "./src/get-config";
1
+ import { getConfig } from "./src";
2
2
 
3
- export default getConfig();
3
+ export default getConfig([
4
+ {
5
+ ignores: ["dist/**"],
6
+ },
7
+ ]);
package/package.json CHANGED
@@ -1,27 +1,38 @@
1
1
  {
2
2
  "name": "@xsynaptic/eslint-config",
3
- "version": "2.0.2",
3
+ "version": "3.0.1",
4
4
  "description": "A common ESLint config factory for TypeScript projects",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
- "main": "./src/get-config.ts",
7
+ "main": "./src/index.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
8
14
  "scripts": {
15
+ "build": "tsdown",
16
+ "build-tsc": "tsc --build",
17
+ "prepublishOnly": "pnpm build",
9
18
  "lint": "eslint",
10
19
  "check-types": "tsc --noEmit --extendedDiagnostics"
11
20
  },
12
21
  "dependencies": {
13
- "@eslint/js": "^9.34.0",
14
- "eslint": "^9.34.0",
22
+ "@eslint/js": "^9.35.0",
23
+ "eslint": "^9.35.0",
15
24
  "eslint-plugin-import": "^2.32.0",
16
25
  "eslint-plugin-jsx-a11y": "^6.10.2",
17
26
  "eslint-plugin-perfectionist": "^4.15.0",
18
- "eslint-plugin-unicorn": "^60.0.0",
19
- "globals": "^16.3.0",
20
- "prettier": "^3.6.2",
21
- "typescript-eslint": "^8.40.0"
27
+ "eslint-plugin-unicorn": "^61.0.2",
28
+ "globals": "^16.4.0",
29
+ "typescript-eslint": "^8.44.0"
22
30
  },
23
31
  "devDependencies": {
32
+ "@eslint/config-helpers": "^0.3.1",
24
33
  "jiti": "^2.5.1",
34
+ "prettier": "^3.6.2",
35
+ "tsdown": "^0.15.1",
25
36
  "typescript": "^5.9.2"
26
37
  },
27
38
  "packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b"
@@ -0,0 +1 @@
1
+ minimumReleaseAge: 1440
@@ -1,5 +1,6 @@
1
- import type { ConfigArray } from "typescript-eslint";
1
+ import type { Config, ConfigWithExtends, ConfigWithExtendsArray } from "@eslint/config-helpers";
2
2
 
3
+ import { defineConfig } from "@eslint/config-helpers";
3
4
  import eslint from "@eslint/js";
4
5
  import perfectionist from "eslint-plugin-perfectionist";
5
6
  import unicornPlugin from "eslint-plugin-unicorn";
@@ -7,10 +8,10 @@ import globals from "globals";
7
8
  import tseslint from "typescript-eslint";
8
9
 
9
10
  export function getConfig(
10
- customConfig?: ConfigArray,
11
+ customConfig?: ConfigWithExtendsArray,
11
12
  options?: {
12
13
  customGlobals?: Record<string, "readonly" | "writeable">;
13
- parserOptions?: NonNullable<ConfigArray[number]["languageOptions"]>["parserOptions"];
14
+ parserOptions?: NonNullable<Config["languageOptions"]>["parserOptions"];
14
15
  },
15
16
  ) {
16
17
  const customGlobals = options?.customGlobals ?? {};
@@ -84,7 +85,7 @@ export function getConfig(
84
85
  "perfectionist/sort-union-types": "off",
85
86
  },
86
87
  },
87
- ] satisfies ConfigArray;
88
+ ] as Array<ConfigWithExtends>; // Note: this is a workaround for a type incompatibility
88
89
 
89
- return tseslint.config([...baseConfig, ...(customConfig ?? [])]);
90
+ return defineConfig(...baseConfig, ...(customConfig ?? []));
90
91
  }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'tsdown';
2
+
3
+ export default defineConfig({
4
+ entry: ['src/*.ts'],
5
+ format: 'esm',
6
+ dts: true,
7
+ minify: true,
8
+ });