@4mbl/tsconfig 0.0.0-beta.fd64d39
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/CHANGELOG.md +26 -0
- package/README.md +50 -0
- package/base.json +46 -0
- package/browser.json +14 -0
- package/next.json +38 -0
- package/node.json +11 -0
- package/package.json +28 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @4mbl/tsconfig Changelog
|
|
2
|
+
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
* Migrated from versioned templates to a single template per type. The package version is now used to determine the template version. This simplifies both the maintenance and usage of the package.
|
|
6
|
+
* Enabled the following options in the base template:
|
|
7
|
+
* `declarationMap`
|
|
8
|
+
* `composite`
|
|
9
|
+
* `tsBuildInfoFile` set to `node_modules/.tmp/tsbuildinfo`
|
|
10
|
+
* `verbatimModuleSyntax`
|
|
11
|
+
* `allowSyntheticDefaultImports`
|
|
12
|
+
* `noImplicitOverride`
|
|
13
|
+
* In the Next.js all paths now use paths relative to the project.
|
|
14
|
+
* Removed `tsBuildInfoFile` from browser template in favor of the base template value.
|
|
15
|
+
|
|
16
|
+
## 3.0.0
|
|
17
|
+
|
|
18
|
+
* Enabled `erasableSyntaxOnly` option in the base template. Requires TypeScript 5.8.0+.
|
|
19
|
+
|
|
20
|
+
## 2.0.0
|
|
21
|
+
|
|
22
|
+
* Changed path options to use `${configDir}` instead of relative paths in base template. Requires TypeScript 5.5.0+.
|
|
23
|
+
|
|
24
|
+
## 1.0.0
|
|
25
|
+
|
|
26
|
+
* Initial release
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @4mbl/tsconfig
|
|
2
|
+
|
|
3
|
+
> TypeScript configuration templates for various environments.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Install the [`@4mbl/tsconfig`](https://www.npmjs.com/package/@4mbl/tsconfig) npm package.
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install -D @4mbl/tsconfig
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Create a `tsconfig.json` file in the root of your project and extend the desired `tsconfig` template.
|
|
14
|
+
|
|
15
|
+
```jsonc
|
|
16
|
+
{
|
|
17
|
+
"extends": "@4mbl/tsconfig/node"
|
|
18
|
+
/* your custom settings */
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Available templates
|
|
23
|
+
|
|
24
|
+
There are currently four `tsconfig` templates.
|
|
25
|
+
|
|
26
|
+
### Base <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/base.json)</kbd>
|
|
27
|
+
|
|
28
|
+
This is the base `tsconfig` file that is used by the other templates. It contains common configuration for TypeScript with minimal environment specific settings.
|
|
29
|
+
|
|
30
|
+
### Node <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/node.json)</kbd>
|
|
31
|
+
|
|
32
|
+
Extends the base template with settings specific to Node.js.
|
|
33
|
+
|
|
34
|
+
### Browser <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/browser.json)</kbd>
|
|
35
|
+
|
|
36
|
+
Extends the base template with settings specific to browser and React applications.
|
|
37
|
+
|
|
38
|
+
### Next <kbd>[tsconfig](https://unpkg.com/@4mbl/tsconfig@latest/next.json)</kbd>
|
|
39
|
+
|
|
40
|
+
Extends the base template with settings from the Next.js app template.
|
|
41
|
+
|
|
42
|
+
## Versioning
|
|
43
|
+
|
|
44
|
+
As of version 4.0.0, the package migrated to a single template per type. The package version is now used to determine the template version. This simplifies both the maintenance and usage of the package.
|
|
45
|
+
|
|
46
|
+
The package follows the following versioning scheme: `X.Y.Z`
|
|
47
|
+
|
|
48
|
+
* `X` - Breaking changes to the base template.
|
|
49
|
+
* `Y` - Breaking changes to individual, non-base templates.
|
|
50
|
+
* `Z` - Minor fixes to any template.
|
package/base.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Base",
|
|
4
|
+
"_version": "3.0.0",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
/* Base Options */
|
|
7
|
+
"lib": ["ESNext"],
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"moduleDetection": "force",
|
|
12
|
+
"baseUrl": "${configDir}/src",
|
|
13
|
+
"paths": {
|
|
14
|
+
"@/*": ["${configDir}/src/*"]
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
/* Output */
|
|
18
|
+
"target": "ES6",
|
|
19
|
+
"outDir": "${configDir}/dist",
|
|
20
|
+
"sourceMap": true,
|
|
21
|
+
"declarationMap": true,
|
|
22
|
+
"composite": true,
|
|
23
|
+
"declaration": true,
|
|
24
|
+
"incremental": true,
|
|
25
|
+
"isolatedModules": true,
|
|
26
|
+
"esModuleInterop": true,
|
|
27
|
+
"tsBuildInfoFile": "${configDir}/node_modules/.tmp/tsconfig.tsbuildinfo",
|
|
28
|
+
"verbatimModuleSyntax": true,
|
|
29
|
+
|
|
30
|
+
/* Linting */
|
|
31
|
+
"strict": true,
|
|
32
|
+
"checkJs": true,
|
|
33
|
+
"erasableSyntaxOnly": true,
|
|
34
|
+
"forceConsistentCasingInFileNames": true,
|
|
35
|
+
"allowSyntheticDefaultImports": true,
|
|
36
|
+
"noFallthroughCasesInSwitch": true,
|
|
37
|
+
"noImplicitAny": true,
|
|
38
|
+
"noImplicitOverride": true,
|
|
39
|
+
"noImplicitReturns": false,
|
|
40
|
+
"noUnusedLocals": true,
|
|
41
|
+
"noUnusedParameters": true,
|
|
42
|
+
"noUncheckedIndexedAccess": true
|
|
43
|
+
},
|
|
44
|
+
"include": ["${configDir}/src/**/*"],
|
|
45
|
+
"exclude": ["${configDir}/node_modules"]
|
|
46
|
+
}
|
package/browser.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Browser",
|
|
4
|
+
"_version": "3.0.0",
|
|
5
|
+
"extends": "../base/3.0.0.json",
|
|
6
|
+
"compilerOptions": {
|
|
7
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"module": "ESNext",
|
|
10
|
+
"moduleResolution": "Bundler",
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"sourceMap": true
|
|
13
|
+
}
|
|
14
|
+
}
|
package/next.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Next.js",
|
|
4
|
+
"_version": "3.0.0",
|
|
5
|
+
"extends": "../base/3.0.0.json",
|
|
6
|
+
"compilerOptions": {
|
|
7
|
+
"target": "ES2017",
|
|
8
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"module": "preserve",
|
|
15
|
+
"moduleResolution": "bundler",
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"jsx": "preserve",
|
|
19
|
+
"incremental": true,
|
|
20
|
+
"plugins": [
|
|
21
|
+
{
|
|
22
|
+
"name": "next"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"paths": {
|
|
26
|
+
"@/*": ["${configDir}/src/*"]
|
|
27
|
+
},
|
|
28
|
+
"rootDir": "${configDir}/src",
|
|
29
|
+
"baseUrl": "${configDir}"
|
|
30
|
+
},
|
|
31
|
+
"include": [
|
|
32
|
+
"${configDir}/next-env.d.ts",
|
|
33
|
+
"${configDir}/**/*.ts",
|
|
34
|
+
"${configDir}/**/*.tsx",
|
|
35
|
+
"${configDir}/.next/types/**/*.ts"
|
|
36
|
+
],
|
|
37
|
+
"exclude": ["${configDir}/node_modules"]
|
|
38
|
+
}
|
package/node.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@4mbl/tsconfig",
|
|
3
|
+
"version": "0.0.0-beta.fd64d39",
|
|
4
|
+
"description": "TypeScript configuration templates for various environments.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "4mbl",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/4mbl/tsconfig#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/4mbl/tsconfig.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"typescript",
|
|
15
|
+
"tsconfig"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "cp templates/*.json ."
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"typescript": ">=5.8.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependenciesMeta": {
|
|
24
|
+
"typescript": {
|
|
25
|
+
"optional": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|