@zigordev/dev 1.3.0 → 1.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 +3 -0
- package/package.json +3 -2
- package/tsconfig/next.json +21 -0
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ One command and a handful of files that a repo refers to instead of writing its
|
|
|
14
14
|
| `tsconfig/base.json` | The strict TypeScript options | `@zigordev/dev/tsconfig/base.json` |
|
|
15
15
|
| `tsconfig/node.json` | The base, for code that Node.js runs from `src` | `@zigordev/dev/tsconfig/node.json` |
|
|
16
16
|
| `tsconfig/library.json` | The same, for a package that is compiled before it ships | `@zigordev/dev/tsconfig/library.json` |
|
|
17
|
+
| `tsconfig/next.json` | The base, for a Next.js app | `@zigordev/dev/tsconfig/next.json` |
|
|
17
18
|
| `lefthook.yml` | The git hooks | `node_modules/@zigordev/dev/lefthook.yml` |
|
|
18
19
|
| `commitlint.js` | The commit rules | `@zigordev/dev/commitlint` |
|
|
19
20
|
| `semantic-release.js` | The release settings, for a repo that publishes packages | `@zigordev/dev/semantic-release` |
|
|
@@ -145,6 +146,8 @@ Biome reads the YAML block at the top of a Markdown file as front matter, becaus
|
|
|
145
146
|
|
|
146
147
|
The TypeScript base turns on strict mode and three checks beyond it: a value read by index may be `undefined`, an override must be marked, and a `switch` case may not fall through. It also accepts only the syntax that Node.js can strip, because Node.js runs the `.ts` files directly.
|
|
147
148
|
|
|
149
|
+
The base for a Next.js app adds the browser's types and JSX, resolves modules the way a bundler does, and writes no output, because Next.js compiles the app itself. It also names the folders where Next.js writes its own types. Next.js adds those to a `tsconfig.json` by itself, but never to one that extends another file.
|
|
150
|
+
|
|
148
151
|
## How to use it
|
|
149
152
|
|
|
150
153
|
Add the package and the tools it drives as dev dependencies: `@zigordev/dev`, `@biomejs/biome`, `@commitlint/cli`, `lefthook`, `markdownlint-cli2` and `typescript`. gitleaks is not an npm package, so pin it in `mise.toml`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zigordev/dev",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "The developer setup every zigordev repo shares: the zigordev command, the Biome config, the TypeScript bases, the git hooks and the commit rules",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"./semantic-release": "./semantic-release.js",
|
|
28
28
|
"./tsconfig/base.json": "./tsconfig/base.json",
|
|
29
29
|
"./tsconfig/node.json": "./tsconfig/node.json",
|
|
30
|
-
"./tsconfig/library.json": "./tsconfig/library.json"
|
|
30
|
+
"./tsconfig/library.json": "./tsconfig/library.json",
|
|
31
|
+
"./tsconfig/next.json": "./tsconfig/next.json"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
33
34
|
"@commitlint/config-conventional": "21.2.4"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"lib": ["dom", "dom.iterable", "es2024"],
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"incremental": true,
|
|
11
|
+
"plugins": [{ "name": "next" }]
|
|
12
|
+
},
|
|
13
|
+
"include": [
|
|
14
|
+
"${configDir}/next-env.d.ts",
|
|
15
|
+
"${configDir}/**/*.ts",
|
|
16
|
+
"${configDir}/**/*.tsx",
|
|
17
|
+
"${configDir}/.next/types/**/*.ts",
|
|
18
|
+
"${configDir}/.next/dev/types/**/*.ts"
|
|
19
|
+
],
|
|
20
|
+
"exclude": ["${configDir}/node_modules"]
|
|
21
|
+
}
|