@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.
- package/.claude/settings.local.json +9 -0
- package/eslint.config.ts +6 -2
- package/package.json +19 -8
- package/pnpm-workspace.yaml +1 -0
- package/src/{get-config.ts → index.ts} +6 -5
- package/tsdown.config.ts +8 -0
package/eslint.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsynaptic/eslint-config",
|
|
3
|
-
"version": "
|
|
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/
|
|
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.
|
|
14
|
-
"eslint": "^9.
|
|
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": "^
|
|
19
|
-
"globals": "^16.
|
|
20
|
-
"
|
|
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 {
|
|
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?:
|
|
11
|
+
customConfig?: ConfigWithExtendsArray,
|
|
11
12
|
options?: {
|
|
12
13
|
customGlobals?: Record<string, "readonly" | "writeable">;
|
|
13
|
-
parserOptions?: NonNullable<
|
|
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
|
-
]
|
|
88
|
+
] as Array<ConfigWithExtends>; // Note: this is a workaround for a type incompatibility
|
|
88
89
|
|
|
89
|
-
return
|
|
90
|
+
return defineConfig(...baseConfig, ...(customConfig ?? []));
|
|
90
91
|
}
|