Skip to content

Commit ae31766

Browse files
Update moduleResolution defaults in tsconfigRules (#3348)
Co-authored-by: Andrew Branch <[email protected]>
1 parent 52338d5 commit ae31766

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/documentation/copy/en/project-config/Compiler Options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ tsc app.ts util.ts --target esnext --outfile index.js
868868
<td><code><a href='/tsconfig/#moduleResolution'>--moduleResolution</a></code></td>
869869
<td><p><code>classic</code>, <code>node10</code>/<code>node</code>, <code>node16</code>, <code>nodenext</code>, or <code>bundler</code></p>
870870
</td>
871-
<td><p><code>Classic</code> if <a href="#module"><code>module</code></a> is <code>AMD</code>, <code>UMD</code>, <code>System</code>, or <code>ES6</code>/<code>ES2015</code>; Matches if <a href="#module"><code>module</code></a> is <code>node16</code> or <code>nodenext</code>; <code>Node</code> otherwise.</p>
871+
<td><p><code>Node10</code> if <a href="#module"><code>module</code></a> is <code>CommonJS</code>; <code>Node16</code> if <a href="#module"><code>module</code></a> is <code>Node16</code> or <code>Node18</code>; <code>NodeNext</code> if <a href="#module"><code>module</code></a> is <code>NodeNext</code>; <code>Bundler</code> if <a href="#module"><code>module</code></a> is <code>Preserve</code>; <code>Classic</code> otherwise.</p>
872872
</td>
873873
</tr>
874874
<tr class="option-description even"><td colspan="3">

packages/tsconfig-reference/scripts/tsconfigRules.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,11 @@ export const defaultsForOptions = {
238238
"`ES6`/`ES2015` otherwise.",
239239
],
240240
moduleResolution: [
241-
"`Classic` if [`module`](#module) is `AMD`, `UMD`, `System`, or `ES6`/`ES2015`;",
242-
"Matches if [`module`](#module) is `node16` or `nodenext`;",
243-
"`Node` otherwise.",
241+
"`Node10` if [`module`](#module) is `CommonJS`;",
242+
"`Node16` if [`module`](#module) is `Node16` or `Node18`;",
243+
"`NodeNext` if [`module`](#module) is `NodeNext`;",
244+
"`Bundler` if [`module`](#module) is `Preserve`;",
245+
"`Classic` otherwise.",
244246
],
245247
newLine: "`lf`",
246248
noImplicitAny: trueIf("strict"),

0 commit comments

Comments
 (0)