ts-builds 2.3.3 → 2.4.0

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/README.md CHANGED
@@ -173,7 +173,7 @@ ts-builds exports base configurations you can extend:
173
173
  ### ESLint
174
174
 
175
175
  ```javascript
176
- // eslint.config.mjs
176
+ // eslint.config.js
177
177
  import baseConfig from "ts-builds/eslint"
178
178
 
179
179
  export default [...baseConfig]
@@ -235,12 +235,11 @@ export default defineConfig(
235
235
 
236
236
  Run `npx ts-builds info` to see all bundled packages. You don't need to install:
237
237
 
238
- - eslint, prettier, typescript, vitest
239
- - @typescript-eslint/eslint-plugin, @typescript-eslint/parser
240
- - eslint-config-prettier, eslint-plugin-prettier, eslint-plugin-import
238
+ - eslint, prettier, typescript, typescript-eslint, vitest
239
+ - @eslint/js, eslint-plugin-prettier, eslint-plugin-simple-import-sort
240
+ - eslint-config-prettier (flagged by cleanup)
241
241
  - @vitest/coverage-v8, @vitest/ui
242
242
  - cross-env, rimraf, ts-node
243
- - And more...
244
243
 
245
244
  ## License
246
245
 
package/dist/cli.js CHANGED
@@ -70,22 +70,19 @@ function runShellCommand(shellCmd, options = {}) {
70
70
  });
71
71
  }
72
72
  const bundledPackages = [
73
- "@eslint/eslintrc",
74
73
  "@eslint/js",
75
- "@typescript-eslint/eslint-plugin",
76
- "@typescript-eslint/parser",
77
74
  "@vitest/coverage-v8",
78
75
  "@vitest/ui",
79
76
  "cross-env",
80
77
  "eslint",
81
78
  "eslint-config-prettier",
82
- "eslint-plugin-import",
83
79
  "eslint-plugin-prettier",
84
80
  "eslint-plugin-simple-import-sort",
85
81
  "prettier",
86
82
  "rimraf",
87
83
  "ts-node",
88
84
  "typescript",
85
+ "typescript-eslint",
89
86
  "vitest"
90
87
  ];
91
88
  const requiredHoistPatterns = [
@@ -0,0 +1,43 @@
1
+ import js from "@eslint/js"
2
+ import prettierRecommended from "eslint-plugin-prettier/recommended"
3
+ import simpleImportSort from "eslint-plugin-simple-import-sort"
4
+ import globals from "globals"
5
+ import tseslint from "typescript-eslint"
6
+
7
+ export default [
8
+ {
9
+ ignores: [
10
+ "**/.gitignore",
11
+ "**/.eslintignore",
12
+ "**/node_modules",
13
+ "**/.DS_Store",
14
+ "**/dist-ssr",
15
+ "**/*.local",
16
+ "**/tsconfig.json",
17
+ ],
18
+ },
19
+ js.configs.recommended,
20
+ ...tseslint.configs.recommended,
21
+ prettierRecommended,
22
+ {
23
+ plugins: {
24
+ "simple-import-sort": simpleImportSort,
25
+ },
26
+ languageOptions: {
27
+ globals: {
28
+ ...globals.browser,
29
+ ...globals.amd,
30
+ ...globals.node,
31
+ },
32
+ ecmaVersion: 2020,
33
+ sourceType: "module",
34
+ },
35
+ rules: {
36
+ "prettier/prettier": ["error", {}, { usePrettierrc: true }],
37
+ "@typescript-eslint/no-unused-vars": "off",
38
+ "@typescript-eslint/explicit-function-return-type": "off",
39
+ "simple-import-sort/imports": "error",
40
+ "simple-import-sort/exports": "error",
41
+ },
42
+ },
43
+ ]
@@ -1,25 +1,12 @@
1
1
  // ESLint FP config: Base + functional programming rules from eslint-config-functype
2
2
  // Includes: no-let, immutable-data, prefer-immutable-types, etc.
3
- import path from "node:path"
4
- import { fileURLToPath } from "node:url"
5
-
6
- import { FlatCompat } from "@eslint/eslintrc"
7
3
  import js from "@eslint/js"
8
- import typescriptEslint from "@typescript-eslint/eslint-plugin"
9
- import tsParser from "@typescript-eslint/parser"
10
4
  import functypeConfig from "eslint-config-functype"
11
5
  import functional from "eslint-plugin-functional"
12
- import prettier from "eslint-plugin-prettier"
6
+ import prettierRecommended from "eslint-plugin-prettier/recommended"
13
7
  import simpleImportSort from "eslint-plugin-simple-import-sort"
14
8
  import globals from "globals"
15
-
16
- const __filename = fileURLToPath(import.meta.url)
17
- const __dirname = path.dirname(__filename)
18
- const compat = new FlatCompat({
19
- baseDirectory: __dirname,
20
- recommendedConfig: js.configs.recommended,
21
- allConfig: js.configs.all,
22
- })
9
+ import tseslint from "typescript-eslint"
23
10
 
24
11
  export default [
25
12
  {
@@ -33,42 +20,27 @@ export default [
33
20
  "**/tsconfig.json",
34
21
  ],
35
22
  },
36
- ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"),
23
+ js.configs.recommended,
24
+ ...tseslint.configs.recommended,
25
+ prettierRecommended,
37
26
  {
38
27
  plugins: {
39
- "@typescript-eslint": typescriptEslint,
40
28
  "simple-import-sort": simpleImportSort,
41
29
  functional,
42
- prettier,
43
30
  },
44
-
45
31
  languageOptions: {
46
32
  globals: {
47
33
  ...globals.browser,
48
34
  ...globals.amd,
49
35
  ...globals.node,
50
36
  },
51
-
52
- parser: tsParser,
53
37
  ecmaVersion: 2020,
54
38
  sourceType: "module",
55
-
56
39
  parserOptions: {
57
40
  projectService: true,
58
41
  },
59
42
  },
60
-
61
- settings: {
62
- "import/resolver": {
63
- node: {
64
- paths: ["'src'"],
65
- extensions: [".js", ".ts"],
66
- },
67
- },
68
- },
69
-
70
43
  rules: {
71
- // Include all rules from eslint-config-functype recommended
72
44
  ...functypeConfig.configs.recommended.rules,
73
45
  },
74
46
  },
@@ -1,26 +1,13 @@
1
1
  // ESLint Functype config: Base + FP rules + eslint-plugin-functype rules
2
2
  // Full functype support: prefer-option, prefer-either, prefer-fold, etc.
3
- import path from "node:path"
4
- import { fileURLToPath } from "node:url"
5
-
6
- import { FlatCompat } from "@eslint/eslintrc"
7
3
  import js from "@eslint/js"
8
- import typescriptEslint from "@typescript-eslint/eslint-plugin"
9
- import tsParser from "@typescript-eslint/parser"
10
4
  import functypeConfig from "eslint-config-functype"
11
5
  import functional from "eslint-plugin-functional"
12
6
  import functypePlugin from "eslint-plugin-functype"
13
- import prettier from "eslint-plugin-prettier"
7
+ import prettierRecommended from "eslint-plugin-prettier/recommended"
14
8
  import simpleImportSort from "eslint-plugin-simple-import-sort"
15
9
  import globals from "globals"
16
-
17
- const __filename = fileURLToPath(import.meta.url)
18
- const __dirname = path.dirname(__filename)
19
- const compat = new FlatCompat({
20
- baseDirectory: __dirname,
21
- recommendedConfig: js.configs.recommended,
22
- allConfig: js.configs.all,
23
- })
10
+ import tseslint from "typescript-eslint"
24
11
 
25
12
  export default [
26
13
  {
@@ -34,45 +21,29 @@ export default [
34
21
  "**/tsconfig.json",
35
22
  ],
36
23
  },
37
- ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"),
24
+ js.configs.recommended,
25
+ ...tseslint.configs.recommended,
26
+ prettierRecommended,
38
27
  {
39
28
  plugins: {
40
- "@typescript-eslint": typescriptEslint,
41
29
  "simple-import-sort": simpleImportSort,
42
30
  functional,
43
31
  functype: functypePlugin,
44
- prettier,
45
32
  },
46
-
47
33
  languageOptions: {
48
34
  globals: {
49
35
  ...globals.browser,
50
36
  ...globals.amd,
51
37
  ...globals.node,
52
38
  },
53
-
54
- parser: tsParser,
55
39
  ecmaVersion: 2020,
56
40
  sourceType: "module",
57
-
58
41
  parserOptions: {
59
42
  projectService: true,
60
43
  },
61
44
  },
62
-
63
- settings: {
64
- "import/resolver": {
65
- node: {
66
- paths: ["'src'"],
67
- extensions: [".js", ".ts"],
68
- },
69
- },
70
- },
71
-
72
45
  rules: {
73
- // Include all rules from eslint-config-functype recommended
74
46
  ...functypeConfig.configs.recommended.rules,
75
- // Functype library-specific rules
76
47
  "functype/prefer-option": "warn",
77
48
  "functype/prefer-either": "warn",
78
49
  "functype/prefer-fold": "warn",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-builds",
3
- "version": "2.3.3",
3
+ "version": "2.4.0",
4
4
  "description": "Shared TypeScript configuration files for library templates. Provides standardized ESLint, Prettier, Vitest, TypeScript, and build configs.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -29,9 +29,9 @@
29
29
  ".": "./prettier-config.cjs",
30
30
  "./prettier": "./prettier-config.cjs",
31
31
  "./prettier-ignore": "./.prettierignore",
32
- "./eslint": "./eslint.config.base.mjs",
33
- "./eslint-fp": "./eslint.config.fp.mjs",
34
- "./eslint-functype": "./eslint.config.functype.mjs",
32
+ "./eslint": "./eslint.config.base.js",
33
+ "./eslint-fp": "./eslint.config.fp.js",
34
+ "./eslint-functype": "./eslint.config.functype.js",
35
35
  "./vitest": "./dist/vitest.config.base.js",
36
36
  "./tsconfig": "./tsconfig.base.json",
37
37
  "./tsdown": "./dist/tsdown.config.base.js",
@@ -42,9 +42,9 @@
42
42
  "files": [
43
43
  "prettier-config.cjs",
44
44
  ".prettierignore",
45
- "eslint.config.base.mjs",
46
- "eslint.config.fp.mjs",
47
- "eslint.config.functype.mjs",
45
+ "eslint.config.base.js",
46
+ "eslint.config.fp.js",
47
+ "eslint.config.functype.js",
48
48
  "dist",
49
49
  "tsconfig.base.json",
50
50
  "package-scripts.json",
@@ -53,20 +53,15 @@
53
53
  "LICENSE"
54
54
  ],
55
55
  "dependencies": {
56
- "@eslint/eslintrc": "^3.3.3",
57
- "@eslint/js": "^9.39.2",
56
+ "@eslint/js": "^10.0.1",
58
57
  "@types/node": "~24.10.13",
59
- "@typescript-eslint/eslint-plugin": "^8.55.0",
60
- "@typescript-eslint/parser": "^8.55.0",
61
58
  "@vitest/coverage-v8": "^4.0.18",
62
59
  "@vitest/ui": "^4.0.18",
63
60
  "cross-env": "^10.1.0",
64
- "eslint": "^9.39.2",
61
+ "eslint": "^10.0.0",
65
62
  "eslint-config-functype": "^1.3.0",
66
- "eslint-config-prettier": "^10.1.8",
67
63
  "eslint-plugin-functional": "^9.0.2",
68
64
  "eslint-plugin-functype": "^1.4.0",
69
- "eslint-plugin-import": "^2.32.0",
70
65
  "eslint-plugin-prettier": "^5.5.5",
71
66
  "eslint-plugin-simple-import-sort": "^12.1.1",
72
67
  "globals": "^17.3.0",
@@ -74,6 +69,7 @@
74
69
  "rimraf": "^6.1.2",
75
70
  "ts-node": "^10.9.2",
76
71
  "typescript": "^5.9.3",
72
+ "typescript-eslint": "^8.55.0",
77
73
  "vitest": "^4.0.18"
78
74
  },
79
75
  "devDependencies": {
@@ -106,5 +102,12 @@
106
102
  "dev": "node dist/cli.js dev",
107
103
  "prepublishOnly": "pnpm validate:bootstrap"
108
104
  },
105
+ "pnpm": {
106
+ "peerDependencyRules": {
107
+ "allowedVersions": {
108
+ "eslint": "10"
109
+ }
110
+ }
111
+ },
109
112
  "packageManager": "pnpm@10.29.3+sha512.498e1fb4cca5aa06c1dcf2611e6fafc50972ffe7189998c409e90de74566444298ffe43e6cd2acdc775ba1aa7cc5e092a8b7054c811ba8c5770f84693d33d2dc"
110
113
  }
@@ -1,76 +0,0 @@
1
- import path from "node:path"
2
- import { fileURLToPath } from "node:url"
3
-
4
- import { FlatCompat } from "@eslint/eslintrc"
5
- import js from "@eslint/js"
6
- import typescriptEslint from "@typescript-eslint/eslint-plugin"
7
- import tsParser from "@typescript-eslint/parser"
8
- import prettier from "eslint-plugin-prettier"
9
- import simpleImportSort from "eslint-plugin-simple-import-sort"
10
- import globals from "globals"
11
-
12
- const __filename = fileURLToPath(import.meta.url)
13
- const __dirname = path.dirname(__filename)
14
- const compat = new FlatCompat({
15
- baseDirectory: __dirname,
16
- recommendedConfig: js.configs.recommended,
17
- allConfig: js.configs.all,
18
- })
19
-
20
- export default [
21
- {
22
- ignores: [
23
- "**/.gitignore",
24
- "**/.eslintignore",
25
- "**/node_modules",
26
- "**/.DS_Store",
27
- "**/dist-ssr",
28
- "**/*.local",
29
- "**/tsconfig.json",
30
- ],
31
- },
32
- ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"),
33
- {
34
- plugins: {
35
- "@typescript-eslint": typescriptEslint,
36
- "simple-import-sort": simpleImportSort,
37
- prettier,
38
- },
39
-
40
- languageOptions: {
41
- globals: {
42
- ...globals.browser,
43
- ...globals.amd,
44
- ...globals.node,
45
- },
46
-
47
- parser: tsParser,
48
- ecmaVersion: 2020,
49
- sourceType: "module",
50
- },
51
-
52
- settings: {
53
- "import/resolver": {
54
- node: {
55
- paths: ["'src'"],
56
- extensions: [".js", ".ts"],
57
- },
58
- },
59
- },
60
-
61
- rules: {
62
- "prettier/prettier": [
63
- "error",
64
- {},
65
- {
66
- usePrettierrc: true,
67
- },
68
- ],
69
-
70
- "@typescript-eslint/no-unused-vars": "off",
71
- "@typescript-eslint/explicit-function-return-type": "off",
72
- "simple-import-sort/imports": "error",
73
- "simple-import-sort/exports": "error",
74
- },
75
- },
76
- ]