@josundt/eslint-config 5.9.7 → 6.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/package.json CHANGED
@@ -1,28 +1,32 @@
1
1
  {
2
2
  "name": "@josundt/eslint-config",
3
- "version": "5.9.7",
3
+ "version": "6.0.1",
4
4
  "description": "ESLint ruleset with required plugins for josundt TypeScript projects",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
- "types": "./eslint-linter-config.d.ts",
8
+ "types": "./preset.d.ts",
9
9
  "default": "./index.js"
10
10
  },
11
11
  "./ts-browser": {
12
- "types": "./eslint-linter-config.d.ts",
12
+ "types": "./preset.d.ts",
13
13
  "default": "./ts-browser.js"
14
14
  },
15
15
  "./ts-jest-browser": {
16
- "types": "./eslint-linter-config.d.ts",
16
+ "types": "./preset.d.ts",
17
17
  "default": "./ts-jest-browser.js"
18
18
  },
19
19
  "./ts-node": {
20
- "types": "./eslint-linter-config.d.ts",
20
+ "types": "./preset.d.ts",
21
21
  "default": "./ts-node.js"
22
22
  },
23
23
  "./ts-jest-node": {
24
- "types": "./eslint-linter-config.d.ts",
24
+ "types": "./preset.d.ts",
25
25
  "default": "./ts-jest-node.js"
26
+ },
27
+ "./utils": {
28
+ "types": "./utils.d.ts",
29
+ "default": "./utils.js"
26
30
  }
27
31
  },
28
32
  "main": "index.js",
@@ -54,26 +58,31 @@
54
58
  "utils/**/*.js"
55
59
  ],
56
60
  "peerDependencies": {
57
- "typescript": ">=5.9.3"
61
+ "typescript": ">=6.0.2"
58
62
  },
59
63
  "dependencies": {
60
- "@eslint/js": "9.39.2",
61
- "@josundt/prettier-config": "^3.7.4",
62
- "@typescript-eslint/eslint-plugin": "8.53.0",
63
- "@typescript-eslint/parser": "8.53.0",
64
- "eslint": "9.39.2",
64
+ "@eslint/js": "10.0.1",
65
+ "@josundt/prettier-config": "^3.8.2",
66
+ "@typescript-eslint/eslint-plugin": "8.58.0",
67
+ "@typescript-eslint/parser": "8.58.0",
68
+ "eslint": "10.2.0",
65
69
  "eslint-formatter-visualstudio": "9.0.1",
66
70
  "eslint-import-resolver-typescript": "4.4.4",
67
71
  "eslint-plugin-eslint-comments": "3.2.0",
68
72
  "eslint-plugin-import": "2.32.0",
69
73
  "eslint-plugin-jasmine": "4.2.2",
70
- "eslint-plugin-jest": "29.12.1",
71
- "eslint-plugin-jsdoc": "62.0.0",
72
- "eslint-plugin-prettier": "5.5.4",
73
- "eslint-plugin-unicorn": "62.0.0",
74
+ "eslint-plugin-jest": "29.15.1",
75
+ "eslint-plugin-jsdoc": "62.9.0",
76
+ "eslint-plugin-prettier": "5.5.5",
77
+ "eslint-plugin-unicorn": "64.0.0",
74
78
  "jiti": "^2.6.1"
75
79
  },
76
80
  "devDependencies": {
77
81
  "@types/eslint__js": "9.14.0"
82
+ },
83
+ "overrides": {
84
+ "eslint-plugin-import": {
85
+ "eslint": "^10"
86
+ }
78
87
  }
79
88
  }
package/preset.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { TsLinterConfig } from "./utils";
2
+
3
+ declare const exp: TsLinterConfig;
4
+ export default exp;
@@ -14,9 +14,8 @@ interface TsLanguageOptions {
14
14
  parserOptions: TsParserOptions;
15
15
  }
16
16
 
17
- interface TsLinterConfig extends Omit<Linter.Config, "languageOptions"> {
17
+ export interface TsLinterConfig extends Omit<Linter.Config, "languageOptions"> {
18
18
  languageOptions: TsLanguageOptions;
19
19
  }
20
20
 
21
- declare const exp: TsLinterConfig;
22
- export default exp;
21
+ export function setTsConfig(path: string, cfg: TsLinterConfig): TsLinterConfig;
package/utils.js ADDED
@@ -0,0 +1,19 @@
1
+ /** @typedef {import("./types").TsLinterConfig} TsLinterConfig */
2
+
3
+ /**
4
+ * @param {string} path
5
+ * @param {TsLinterConfig} cfg
6
+ * @returns {TsLinterConfig}
7
+ */
8
+ export function setTsConfig(path, cfg) {
9
+ return {
10
+ ...cfg,
11
+ languageOptions: {
12
+ ...(cfg.languageOptions ?? {}),
13
+ parserOptions: {
14
+ ...(cfg.languageOptions?.parserOptions ?? {}),
15
+ project: path
16
+ }
17
+ }
18
+ };
19
+ }