@foxglove/tsconfig 3.0.0 → 3.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/README.md CHANGED
@@ -20,6 +20,8 @@ Choose the config that matches your environment:
20
20
 
21
21
  ### Node.js applications and libraries
22
22
 
23
+ Uses `module: "NodeNext"` which enforces Node.js ESM rules, where imports must include explicit file extensions (e.g., `import { foo } from "./bar.ts"`).
24
+
23
25
  ```json
24
26
  {
25
27
  "extends": "@foxglove/tsconfig/node.json",
@@ -33,28 +35,31 @@ Choose the config that matches your environment:
33
35
 
34
36
  > **Note:** Uses `target: "ESNext"`. For older Node.js versions, set a lower target (e.g., `"ES2022"` for Node 18).
35
37
 
36
- > **Cross-platform libraries:** Use `node.json` even if your library will be used in frontend apps. Bundlers consume Node-style packages nativelyjust avoid Node-specific APIs like `fs` or `process`.
38
+ > **Cross-platform libraries:** Use `node.json` even if your library will be used in bundled apps. Bundlers consume Node-style packages natively, just remember to avoid Node-specific APIs like `fs` or `process`.
37
39
 
38
- ### Frontend applications (Vite, Webpack, esbuild, etc)
40
+ ### Bundled applications (Vite, Webpack, esbuild, etc)
39
41
 
40
- For bundled apps that run in the browser (not published as packages):
42
+ Uses `module: "Preserve"` which allows extensionless imports (e.g., `import { foo } from "./bar"`, where the bundler handles resolution.
41
43
 
42
44
  ```json
43
45
  {
44
46
  "extends": "@foxglove/tsconfig/bundler.json",
45
- "include": ["./src/**/*"]
47
+ "include": ["./src/**/*"],
48
+ "compilerOptions": {
49
+ "noEmit": true,
50
+ "lib": ["ESNext", "DOM"]
51
+ }
46
52
  }
47
53
  ```
48
54
 
49
55
  ### Base config
50
56
 
51
- Provides strict type-checking and modern defaults, but no `module`, `moduleResolution`, or `target` settings. Use this when `node.json` and `bundler.json` don't fit your environment:
57
+ Provides strict type-checking and modern defaults, but no `module` or `moduleResolution` settings. Use this when `node.json` and `bundler.json` don't fit your environment:
52
58
 
53
59
  ```json
54
60
  {
55
61
  "extends": "@foxglove/tsconfig/base.json",
56
62
  "compilerOptions": {
57
- "target": "...",
58
63
  "module": "...",
59
64
  "moduleResolution": "..."
60
65
  }
package/base.json CHANGED
@@ -5,6 +5,9 @@
5
5
  {
6
6
  "$schema": "https://json.schemastore.org/tsconfig",
7
7
  "compilerOptions": {
8
+ // Language
9
+ "target": "ESNext",
10
+
8
11
  // Type checking
9
12
  "strict": true,
10
13
  "noFallthroughCasesInSwitch": true,
package/bundler.json CHANGED
@@ -6,8 +6,6 @@
6
6
  "compilerOptions": {
7
7
  // Bundler handles module resolution
8
8
  "module": "Preserve",
9
- "moduleResolution": "Bundler",
10
- "target": "ESNext",
11
- "lib": ["ESNext", "DOM", "DOM.AsyncIterable", "DOM.Iterable"]
9
+ "moduleResolution": "Bundler"
12
10
  }
13
11
  }
package/node.json CHANGED
@@ -6,7 +6,6 @@
6
6
  "compilerOptions": {
7
7
  // Node.js ESM
8
8
  "module": "NodeNext",
9
- "moduleResolution": "NodeNext",
10
- "target": "ESNext"
9
+ "moduleResolution": "NodeNext"
11
10
  }
12
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxglove/tsconfig",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Base TypeScript configuration for Foxglove projects",
5
5
  "license": "MIT",
6
6
  "repository": {