@allkit/tsconfig 0.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 ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@allkit/tsconfig",
3
+ "version": "0.0.1",
4
+ "description": "A base TSConfig for working with allkit",
5
+ "author": "SPig",
6
+ "main": "tsconfig.json",
7
+ "license": "MIT",
8
+ "keywords": [
9
+ "vue",
10
+ "mid",
11
+ "tsconfig"
12
+ ],
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "peerDependencies": {
17
+ "@types/node": "*"
18
+ }
19
+ }
package/skill/SKILL.md ADDED
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: tsconfig
3
+ description: TypeScript 配置文件,确保类型安全和更好的开发体验 / TypeScript configuration for type safety
4
+ author: allkit
5
+ category: tooling
6
+ ---
7
+
8
+ # @allkit/tsconfig
9
+
10
+ TypeScript 配置文件,确保类型安全和更好的开发体验。
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pnpm add -D typescript @allkit/tsconfig
16
+ ```
17
+
18
+ ## Configurations
19
+
20
+ | Name | Description |
21
+ |------|-------------|
22
+ | [tsconfig.web](./references/tsconfig.web.md) | Web 应用配置 |
23
+ | [tsconfig.node](./references/tsconfig.node.md) | Node.js 配置 |
24
+ | [tsconfig.vitest](./references/tsconfig.vitest.md) | Vitest 配置 |
25
+
26
+ ## Usage
27
+
28
+ ```json
29
+ {
30
+ "extends": "@allkit/tsconfig/tsconfig.web.json"
31
+ }
32
+ ```
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "@allkit/tsconfig/tsconfig.web.json",
3
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
4
+ "compilerOptions": {
5
+ "baseUrl": ".",
6
+ "paths": {
7
+ "@/*": ["src/*"]
8
+ },
9
+ "types": ["vite/client"]
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ # tsconfig.node.json
2
+
3
+ Node.js TypeScript 配置
4
+
5
+ ## Usage
6
+
7
+ ```json
8
+ {
9
+ "extends": "@allkit/tsconfig/tsconfig.node.json",
10
+ "include": ["vite.config.ts", "build/**/*.ts"]
11
+ }
12
+ ```
@@ -0,0 +1,12 @@
1
+ # tsconfig.vitest.json
2
+
3
+ Vitest 测试 TypeScript 配置
4
+
5
+ ## Usage
6
+
7
+ ```json
8
+ {
9
+ "extends": "@allkit/tsconfig/tsconfig.vitest.json",
10
+ "include": ["src/**/*.test.ts", "src/**/*.spec.ts"]
11
+ }
12
+ ```
@@ -0,0 +1,25 @@
1
+ # tsconfig.web.json
2
+
3
+ Web 应用 TypeScript 配置
4
+
5
+ ## Features
6
+
7
+ - Target: ES2020
8
+ - Module: ESNext
9
+ - JSX: preserve
10
+ - Strict mode enabled
11
+ - Path aliases support
12
+
13
+ ## Usage
14
+
15
+ ```json
16
+ {
17
+ "extends": "@allkit/tsconfig/tsconfig.web.json",
18
+ "compilerOptions": {
19
+ "baseUrl": ".",
20
+ "paths": {
21
+ "@/*": ["src/*"]
22
+ }
23
+ }
24
+ }
25
+ ```
package/tsconfig.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+
6
+ "sourceMap": false,
7
+ "strict": true,
8
+ "noEmit": true,
9
+
10
+ "jsx": "preserve",
11
+ "jsxImportSource": "vue",
12
+
13
+ "allowJs": true,
14
+ "verbatimModuleSyntax": true,
15
+
16
+ "esModuleInterop": true,
17
+ "moduleResolution": "bundler",
18
+ "resolveJsonModule": true,
19
+
20
+ "forceConsistentCasingInFileNames": true,
21
+ "skipLibCheck": true,
22
+ "noUnusedLocals": true,
23
+ "noUnusedParameters": true,
24
+ "noImplicitThis": true,
25
+ "noImplicitAny": true,
26
+ "noImplicitReturns": true,
27
+ "allowSyntheticDefaultImports": true
28
+ }
29
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "composite": true,
5
+ "types": ["node"]
6
+ },
7
+ "include": [
8
+ "vite.config.*",
9
+ "vitest.config.*",
10
+ "playwright.config.*"
11
+ ]
12
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": [],
4
+ "compilerOptions": {
5
+ "composite": true,
6
+ "lib": [],
7
+ "types": ["node", "jsdom"]
8
+ }
9
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "lib": [
5
+ // Target ES2020 to align with Vite.
6
+ // <https://vite.dev/config/build-options.html#build-target>
7
+ // Support for newer versions of language built-ins are
8
+ // left for the users to include, because that would require:
9
+ // - either the project doesn't need to support older versions of browsers;
10
+ // - or the project has properly included the necessary polyfills.
11
+ "ES2020",
12
+
13
+ "DOM",
14
+ "DOM.Iterable"
15
+ // No `ScriptHost` because Vue 3 dropped support for IE
16
+ ]
17
+ },
18
+ "types": []
19
+
20
+ }