@f2e-spec-next/tsconfig 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Huangjunsen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,26 @@
1
- # Temporary Holding Version
1
+ # @f2e-spec-next/tsconfig
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 面向现代前端与 Node.js 工程的 TypeScript 共享配置预设,提供以下 4 套开箱即用的模板:
4
+
5
+ - `@f2e-spec-next/tsconfig/base.json`:通用严格基础配置(ES2022 + strict)
6
+ - `@f2e-spec-next/tsconfig/node.json`:Node.js 纯 ESM 库/服务配置(`NodeNext` + `.d.ts`)
7
+ - `@f2e-spec-next/tsconfig/web.json`:现代前端打包器项目配置(`Bundler` + `DOM` + `noEmit`)
8
+ - `@f2e-spec-next/tsconfig/react.json`:React 项目配置(继承 `web.json` + `react-jsx`)
9
+ - `@f2e-spec-next/tsconfig/vue.json`:Vue 3 项目配置(继承 `web.json` + `preserve` JSX + `verbatimModuleSyntax`,配合 `vue-tsc --noEmit`)
10
+
11
+ ## 安装
12
+
13
+ ```bash
14
+ pnpm add -D typescript @f2e-spec-next/tsconfig
15
+ ```
16
+
17
+ ## 使用
18
+
19
+ 在项目根目录 `tsconfig.json` 中继承:
20
+
21
+ ```json
22
+ {
23
+ "extends": "@f2e-spec-next/tsconfig/react.json",
24
+ "include": ["src"]
25
+ }
26
+ ```
package/base.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "F2E Spec Next Base",
4
+ "compilerOptions": {
5
+ "target": "ES2022",
6
+ "lib": ["ES2022"],
7
+ "strict": true,
8
+ "esModuleInterop": true,
9
+ "resolveJsonModule": true,
10
+ "isolatedModules": true,
11
+ "verbatimModuleSyntax": false,
12
+ "skipLibCheck": true,
13
+ "forceConsistentCasingInFileNames": true,
14
+ "noUncheckedIndexedAccess": true,
15
+ "noImplicitOverride": true
16
+ }
17
+ }
package/node.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "F2E Spec Next Node ESM",
4
+ "extends": "./base.json",
5
+ "compilerOptions": {
6
+ "module": "NodeNext",
7
+ "moduleResolution": "NodeNext",
8
+ "declaration": true,
9
+ "declarationMap": true,
10
+ "sourceMap": true
11
+ }
12
+ }
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@f2e-spec-next/tsconfig",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "面向现代前端与 Node.js 工程的 TypeScript 共享配置预设",
5
+ "keywords": [
6
+ "tsconfig",
7
+ "typescript",
8
+ "f2e-spec-next"
9
+ ],
10
+ "homepage": "https://github.com/huangjunsen0406/f2e-spec-next#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/huangjunsen0406/f2e-spec-next/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/huangjunsen0406/f2e-spec-next.git",
17
+ "directory": "packages/tsconfig"
18
+ },
19
+ "license": "MIT",
20
+ "author": "Huangjunsen <951434130@qq.com>",
21
+ "type": "module",
22
+ "exports": {
23
+ "./base.json": "./base.json",
24
+ "./node.json": "./node.json",
25
+ "./web.json": "./web.json",
26
+ "./react.json": "./react.json",
27
+ "./vue.json": "./vue.json"
28
+ },
29
+ "files": [
30
+ "base.json",
31
+ "node.json",
32
+ "web.json",
33
+ "react.json",
34
+ "vue.json",
35
+ "README.md"
36
+ ],
37
+ "peerDependencies": {
38
+ "typescript": ">=5.5.0"
39
+ },
40
+ "engines": {
41
+ "node": ">=20.19.0"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "scripts": {
47
+ "build": "echo \"tsconfig 为静态 JSON 预设,无需编译\"",
48
+ "test": "vitest run",
49
+ "typecheck": "echo \"tsconfig 为静态 JSON 预设,跳过类型检查\""
50
+ }
6
51
  }
package/react.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "F2E Spec Next React",
4
+ "extends": "./web.json",
5
+ "compilerOptions": {
6
+ "jsx": "react-jsx"
7
+ }
8
+ }
package/vue.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "F2E Spec Next Vue 3",
4
+ "extends": "./web.json",
5
+ "compilerOptions": {
6
+ "jsx": "preserve",
7
+ "verbatimModuleSyntax": true,
8
+ "moduleDetection": "force"
9
+ }
10
+ }
package/web.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "F2E Spec Next Web App",
4
+ "extends": "./base.json",
5
+ "compilerOptions": {
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "module": "ESNext",
8
+ "moduleResolution": "Bundler",
9
+ "noEmit": true
10
+ }
11
+ }