@adbayb/stack 0.0.0-next-d3d6a87 → 0.0.0-next-2ad39fd
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.
|
@@ -1,4 +1,52 @@
|
|
|
1
|
+
<br>
|
|
1
2
|
<div align="center">
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
<h1>@adbayb/stack/typescript</h1>
|
|
4
|
+
<strong>My opinionated TypeScript configuration preset</strong>
|
|
4
5
|
</div>
|
|
6
|
+
<br>
|
|
7
|
+
<br>
|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
This package offers an opinionated but extensible **[TSConfigs](https://www.typescriptlang.org/tsconfig/)** to align TypeScript configurations across my projects.
|
|
12
|
+
|
|
13
|
+
It allows to:
|
|
14
|
+
|
|
15
|
+
- Make collaboration across my projects effective (including onboarding with a consistent look and writing patterns).
|
|
16
|
+
- Include a minimum viable and required set of rules to foster maintainable, testable, secure, and green code over time.
|
|
17
|
+
- Accelerate development by reusing common configuration and convention defaults.
|
|
18
|
+
|
|
19
|
+
<br />
|
|
20
|
+
|
|
21
|
+
## 🚀 Quick Start
|
|
22
|
+
|
|
23
|
+
### 1️⃣ Installation
|
|
24
|
+
|
|
25
|
+
At the root level of your project, run the following command:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm add @adbayb/stack --save-dev --workspace-root
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2️⃣ Usage
|
|
32
|
+
|
|
33
|
+
Edit the `tsconfig.json` file to include the following:
|
|
34
|
+
|
|
35
|
+
```jsonc
|
|
36
|
+
{
|
|
37
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
38
|
+
"extends": "@adbayb/stack/typescript",
|
|
39
|
+
"include": ["src"], // Depending on your project specificities
|
|
40
|
+
"exclude": ["node_modules", "dist"], // Depending on your project specificities
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The default configuration is versatile and suitable for all projects, whether back-end or front-end.
|
|
45
|
+
|
|
46
|
+
However, certain configuration flavors are also available for tailoring project-specific needs, which require extending the base `@adbayb/stack/typescript` configuration:
|
|
47
|
+
|
|
48
|
+
| Flavor | Description | Usage |
|
|
49
|
+
| -------------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
50
|
+
| `@adbayb/stack/typescript/react` | React-based configurations to set up JSX and global DOM types | `"extends": ["@adbayb/stack/typescript", "@adbayb/stack/typescript/react"]` |
|
|
51
|
+
|
|
52
|
+
<br />
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json.schemastore.org/tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"allowArbitraryExtensions": true,
|
|
5
|
+
"allowImportingTsExtensions": false,
|
|
6
|
+
"allowJs": false,
|
|
7
|
+
"allowUnreachableCode": false,
|
|
8
|
+
"allowUnusedLabels": false,
|
|
9
|
+
"checkJs": false,
|
|
10
|
+
"composite": true,
|
|
11
|
+
"exactOptionalPropertyTypes": true,
|
|
12
|
+
"lib": ["ESNext"],
|
|
13
|
+
"module": "Preserve",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noErrorTruncation": true,
|
|
16
|
+
"noFallthroughCasesInSwitch": true,
|
|
17
|
+
"noImplicitOverride": true,
|
|
18
|
+
"noImplicitReturns": true,
|
|
19
|
+
"noUncheckedIndexedAccess": true,
|
|
20
|
+
"noUncheckedSideEffectImports": true,
|
|
21
|
+
"noUnusedLocals": true,
|
|
22
|
+
"noUnusedParameters": true,
|
|
23
|
+
"skipLibCheck": true,
|
|
24
|
+
"strict": true,
|
|
25
|
+
"target": "ESNext",
|
|
26
|
+
"verbatimModuleSyntax": true
|
|
27
|
+
}
|
|
28
|
+
}
|
package/dist/index.mjs
CHANGED
|
@@ -327,7 +327,7 @@ const PRESERVE_FILES = [
|
|
|
327
327
|
];
|
|
328
328
|
|
|
329
329
|
var name = "@adbayb/stack";
|
|
330
|
-
var version = "0.0.0-next-
|
|
330
|
+
var version = "0.0.0-next-2ad39fd";
|
|
331
331
|
var description = "My opinionated JavaScript-based toolchain";
|
|
332
332
|
var publishConfig = {
|
|
333
333
|
access: "public"
|
|
@@ -349,7 +349,8 @@ var exports = {
|
|
|
349
349
|
},
|
|
350
350
|
"./eslint": "./config/eslint/index.mjs",
|
|
351
351
|
"./prettier": "./config/prettier/index.mjs",
|
|
352
|
-
"./typescript": "./config/typescript/
|
|
352
|
+
"./typescript": "./config/typescript/base.json",
|
|
353
|
+
"./typescript/react": "./config/typescript/react.json"
|
|
353
354
|
};
|
|
354
355
|
var scripts = {
|
|
355
356
|
prepublishOnly: "pnpm build",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adbayb/stack",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-2ad39fd",
|
|
4
4
|
"description": "My opinionated JavaScript-based toolchain",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"./eslint": "./config/eslint/index.mjs",
|
|
24
24
|
"./prettier": "./config/prettier/index.mjs",
|
|
25
|
-
"./typescript": "./config/typescript/
|
|
25
|
+
"./typescript": "./config/typescript/base.json",
|
|
26
|
+
"./typescript/react": "./config/typescript/react.json"
|
|
26
27
|
},
|
|
27
28
|
"keywords": [
|
|
28
29
|
"stack",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json.schemastore.org/tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"incremental": true,
|
|
5
|
-
"target": "ESNext",
|
|
6
|
-
"jsx": "react-jsx",
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"module": "ESNext",
|
|
9
|
-
"moduleResolution": "Bundler",
|
|
10
|
-
"resolveJsonModule": true,
|
|
11
|
-
"allowJs": false,
|
|
12
|
-
"checkJs": false,
|
|
13
|
-
"maxNodeModuleJsDepth": 1,
|
|
14
|
-
"declaration": true,
|
|
15
|
-
"removeComments": false,
|
|
16
|
-
"isolatedModules": true,
|
|
17
|
-
"allowSyntheticDefaultImports": true,
|
|
18
|
-
"esModuleInterop": true,
|
|
19
|
-
"forceConsistentCasingInFileNames": true,
|
|
20
|
-
"strict": true,
|
|
21
|
-
"noUnusedLocals": true,
|
|
22
|
-
"noUnusedParameters": true,
|
|
23
|
-
"exactOptionalPropertyTypes": true,
|
|
24
|
-
"noImplicitReturns": true,
|
|
25
|
-
"noFallthroughCasesInSwitch": true,
|
|
26
|
-
"noUncheckedIndexedAccess": true,
|
|
27
|
-
"noImplicitOverride": true,
|
|
28
|
-
"skipLibCheck": true
|
|
29
|
-
}
|
|
30
|
-
}
|