@robotostudio/tsconfig 0.0.0-stage → 0.1.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 Roboto 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,32 @@
1
- # Temporary Holding Version
1
+ # @robotostudio/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
+ Roboto Studio's strictest TypeScript configs. Each one extends
4
+ [`@tsconfig/strictest`](https://github.com/tsconfig/bases) and adds `verbatimModuleSyntax`, `erasableSyntaxOnly`,
5
+ `noUncheckedSideEffectImports` and `moduleDetection: "force"`.
6
+
7
+ | Config | For | Adds |
8
+ | -------------------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
9
+ | `base.json` | The parent of the others | Target ES2024. No `module` or `moduleResolution`: extend it only with your own. |
10
+ | `library.json` | A Bun or Node library or CLI | `NodeNext` modules, lib ES2024, `declaration` |
11
+ | `react-library.json` | A React component library | `library.json` plus DOM libs and `jsx: "react-jsx"` |
12
+ | `nextjs.json` | A Next.js app | `Bundler` resolution, DOM libs, `jsx: "react-jsx"`, `allowJs`, `noEmit`, the `next` plugin |
13
+
14
+ `@tsconfig/strictest` turns on `strict`, `noUncheckedIndexedAccess`, `exactOptionalPropertyTypes`,
15
+ `noImplicitOverride`, `noPropertyAccessFromIndexSignature`, `noImplicitReturns`, `noUnusedLocals`,
16
+ `noUnusedParameters`, `noFallthroughCasesInSwitch`, `isolatedModules` and `skipLibCheck`.
17
+
18
+ ## Use it
19
+
20
+ 1. Install it: `bun add -d @robotostudio/tsconfig`. It needs TypeScript 5.8 or later.
21
+ 2. Extend one config in `tsconfig.json`. Set `types` and `include` in the repo:
22
+
23
+ ```json
24
+ {
25
+ "extends": "@robotostudio/tsconfig/library.json",
26
+ "compilerOptions": { "types": ["node"], "outDir": "dist" },
27
+ "include": ["src"]
28
+ }
29
+ ```
30
+
31
+ 3. With `library.json` or `react-library.json`, set `"type": "module"` in `package.json`. `NodeNext` treats a `.ts`
32
+ file as CommonJS without it, and `verbatimModuleSyntax` then rejects every `export`.
package/base.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "@tsconfig/strictest/tsconfig.json",
4
+ "compilerOptions": {
5
+ "target": "ES2024",
6
+ "verbatimModuleSyntax": true,
7
+ "erasableSyntaxOnly": true,
8
+ "noUncheckedSideEffectImports": true,
9
+ "moduleDetection": "force",
10
+ "resolveJsonModule": true
11
+ }
12
+ }
package/library.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "lib": ["ES2024"],
6
+ "module": "NodeNext",
7
+ "moduleResolution": "NodeNext",
8
+ "declaration": true
9
+ }
10
+ }
package/nextjs.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./base.json",
4
+ "compilerOptions": {
5
+ "lib": ["ES2024", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "moduleResolution": "Bundler",
8
+ "jsx": "react-jsx",
9
+ "allowJs": true,
10
+ "noEmit": true,
11
+ "incremental": true,
12
+ "plugins": [{ "name": "next" }]
13
+ }
14
+ }
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@robotostudio/tsconfig",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Roboto Studio's strictest TypeScript configs: a base, a Bun or Node library, a Next.js app and a React library.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/robotostudio/platform.git",
9
+ "directory": "packages/tsconfig"
10
+ },
11
+ "files": [
12
+ "base.json",
13
+ "library.json",
14
+ "nextjs.json",
15
+ "react-library.json",
16
+ "LICENSE",
17
+ "README.md"
18
+ ],
19
+ "type": "module",
20
+ "exports": {
21
+ "./base.json": "./base.json",
22
+ "./library.json": "./library.json",
23
+ "./nextjs.json": "./nextjs.json",
24
+ "./react-library.json": "./react-library.json",
25
+ "./package.json": "./package.json"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "scripts": {
31
+ "test": "tsc -p test/base.json && tsc -p test/library.json && tsc -p test/nextjs.json && tsc -p test/react-library.json"
32
+ },
33
+ "dependencies": {
34
+ "@tsconfig/strictest": "2.0.9"
35
+ }
36
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./library.json",
4
+ "compilerOptions": {
5
+ "lib": ["ES2024", "DOM", "DOM.Iterable"],
6
+ "jsx": "react-jsx"
7
+ }
8
+ }