@neon-pixels/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 Neon Pixels Studio
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,59 @@
1
- # Temporary Holding Version
1
+ # @neon-pixels/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
+ Shared [TypeScript](https://www.typescriptlang.org) config bases for Neon Pixels projects. Every base turns on the same strictness: `strict`, `noUnusedLocals`, `noUnusedParameters`, and `noFallthroughCasesInSwitch`.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ pnpm add -D typescript @neon-pixels/tsconfig
9
+ ```
10
+
11
+ TypeScript is a peer dependency, so install it yourself. The `node` base sets `types: ["node"]`, so install `@types/node` too.
12
+
13
+ ## Usage
14
+
15
+ Pick one entry point and extend it.
16
+
17
+ | Entry point | For | `extends` |
18
+ | --------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------- |
19
+ | `@neon-pixels/tsconfig` | The strict base alone, with no stack assumptions | `"@neon-pixels/tsconfig"` |
20
+ | `@neon-pixels/tsconfig/nuxt` | Nuxt apps | `"@neon-pixels/tsconfig/nuxt"` |
21
+ | `@neon-pixels/tsconfig/vitepress` | VitePress sites | `"@neon-pixels/tsconfig/vitepress"` |
22
+ | `@neon-pixels/tsconfig/node` | Node CLIs and libraries (`NodeNext`, declarations; ESM when your package sets `"type": "module"`) | `"@neon-pixels/tsconfig/node"` |
23
+
24
+ ### Node and VitePress
25
+
26
+ In `tsconfig.json`:
27
+
28
+ ```json
29
+ {
30
+ "extends": "@neon-pixels/tsconfig/node",
31
+ "include": ["src"]
32
+ }
33
+ ```
34
+
35
+ ### Nuxt
36
+
37
+ Nuxt generates its own `.nuxt/tsconfig.*.json` files and your root `tsconfig.json` only points at them with `references`, so a root `extends` never reaches them. Keep the references Nuxt documents, and hand the base to Nuxt so it ends up in every generated file. In `nuxt.config.ts`:
38
+
39
+ ```ts
40
+ const neonPixelsTsconfig = { extends: "@neon-pixels/tsconfig/nuxt" };
41
+
42
+ export default defineNuxtConfig({
43
+ typescript: {
44
+ appTsConfig: neonPixelsTsconfig,
45
+ serverTsConfig: neonPixelsTsconfig,
46
+ sharedTsConfig: neonPixelsTsconfig,
47
+ nodeTsConfig: neonPixelsTsconfig,
48
+ },
49
+ });
50
+ ```
51
+
52
+ Nuxt's own options win where they overlap, so the generated paths, `moduleResolution`, and `lib` are untouched. The base only adds the strictness Nuxt does not set.
53
+
54
+ ## What the consuming repo still sets
55
+
56
+ - `paths` and path aliases
57
+ - `include` and `exclude`
58
+ - `outDir`, `rootDir`, and anything else tied to your layout
59
+ - Any extra strictness, such as `noUncheckedIndexedAccess`, or per-app options
package/base.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "strict": true,
5
+ "noUnusedLocals": true,
6
+ "noUnusedParameters": true,
7
+ "noFallthroughCasesInSwitch": true,
8
+ "skipLibCheck": true
9
+ }
10
+ }
package/node.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "target": "ES2022",
6
+ "lib": ["ES2022"],
7
+ "module": "NodeNext",
8
+ "moduleResolution": "NodeNext",
9
+ "esModuleInterop": true,
10
+ "declaration": true,
11
+ "types": ["node"]
12
+ }
13
+ }
package/nuxt.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,48 @@
1
1
  {
2
2
  "name": "@neon-pixels/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": "Shared TypeScript configuration bases for Neon Pixels projects.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/neonpixels-studio/packages.git",
10
+ "directory": "packages/tsconfig"
11
+ },
12
+ "exports": {
13
+ ".": "./base.json",
14
+ "./nuxt": "./nuxt.json",
15
+ "./vitepress": "./vitepress.json",
16
+ "./node": "./node.json",
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "base.json",
21
+ "nuxt.json",
22
+ "vitepress.json",
23
+ "node.json"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "engines": {
29
+ "node": "^22.17.0 || ^24.0.0 || >=26.0.0"
30
+ },
31
+ "peerDependencies": {
32
+ "typescript": ">=5.0.0",
33
+ "@types/node": ">=22"
34
+ },
35
+ "devDependencies": {
36
+ "@neon-pixels/tsconfig": "0.2.0",
37
+ "@types/node": "^26.6.6",
38
+ "typescript": "~6.0.3"
39
+ },
40
+ "peerDependenciesMeta": {
41
+ "@types/node": {
42
+ "optional": true
43
+ }
44
+ },
45
+ "scripts": {
46
+ "typecheck": "tsc --noEmit -p tsconfig.json"
47
+ }
6
48
  }
package/vitepress.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "target": "ES2022",
6
+ "module": "ESNext",
7
+ "moduleResolution": "bundler",
8
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
9
+ "useDefineForClassFields": true,
10
+ "resolveJsonModule": true,
11
+ "allowImportingTsExtensions": true,
12
+ "noEmit": true
13
+ }
14
+ }