Skip to content

Commit 8166eaf

Browse files
authored
Document release version of every tsconfig option (#3310)
1 parent 846a372 commit 8166eaf

File tree

1 file changed

+89
-17
lines changed

1 file changed

+89
-17
lines changed

packages/tsconfig-reference/scripts/tsconfigRules.ts

Lines changed: 89 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const recommended = [
8787
"exactOptionalPropertyTypes",
8888
];
8989

90-
type RootProperties = "files" | "extends" | "include" | "exclude";
90+
type RootProperties = "files" | "extends" | "include" | "exclude" | "references";
9191
type WatchProperties =
9292
| "force"
9393
| "watchFile"
@@ -313,18 +313,40 @@ function formatAllowedValues(type: CommandLineOption["type"]) {
313313
}
314314

315315
export const releaseToConfigsMap: { [key: string]: AnOption[] } = {
316+
"5.7": ["rewriteRelativeImportExtensions"],
317+
"5.6": ["strictBuiltinIteratorReturn", "noUncheckedSideEffectImports"],
318+
"5.5": ["isolatedDeclarations", "noCheck"],
319+
"5.0": [
320+
"allowArbitraryExtensions",
321+
"allowImportingTsExtensions",
322+
"customConditions",
323+
"resolvePackageJsonExports",
324+
"resolvePackageJsonImports",
325+
"verbatimModuleSyntax",
326+
],
316327
"4.7": ["moduleDetection", "moduleSuffixes"],
317328
"4.5": ["preserveValueImports"],
318329
"4.4": ["exactOptionalPropertyTypes", "useUnknownInCatchVariables"],
319330
"4.3": ["noImplicitOverride"],
320-
"4.2": ["noPropertyAccessFromIndexSignature", "explainFiles"],
321-
"4.1": ["jsxImportSource", "noUncheckedIndexedAccess", "disableFilenameBasedTypeAcquisition"],
331+
"4.2": [
332+
"noPropertyAccessFromIndexSignature",
333+
"explainFiles",
334+
"excludeDirectories",
335+
"excludeFiles",
336+
],
337+
"4.1": [
338+
"generateTrace",
339+
"jsxImportSource",
340+
"noUncheckedIndexedAccess",
341+
"disableFilenameBasedTypeAcquisition",
342+
],
322343
"4.0": ["jsxFragmentFactory", "disableReferencedProjectLoad"],
323344
"3.8": [
324345
"assumeChangesOnlyAffectDirectDependencies",
325346
"importsNotUsedAsValues",
326347
"disableSolutionSearching",
327348
"fallbackPolling",
349+
"synchronousWatchDirectory",
328350
"watchDirectory",
329351
"watchFile",
330352
],
@@ -336,38 +358,88 @@ export const releaseToConfigsMap: { [key: string]: AnOption[] } = {
336358
"3.5": ["allowUmdGlobalAccess"],
337359
"3.4": ["incremental", "tsBuildInfoFile"],
338360
"3.2": ["strictBindCallApply", "showConfig"],
339-
"3.0": ["composite", "build"],
340-
"2.9": ["keyofStringsOnly", "declarationMap"],
341-
"2.8": ["emitDeclarationOnly"],
361+
"3.0": ["composite", "references"],
362+
"2.9": ["declarationMap", "keyofStringsOnly", "resolveJsonModule"],
363+
"2.8": ["emitDeclarationOnly", "preserveWatchOutput"],
342364
"2.7": ["strictPropertyInitialization", "esModuleInterop"],
343365
"2.6": ["strictFunctionTypes"],
344-
"2.4": ["noStrictGenericChecks"],
366+
"2.5": ["noStrictGenericChecks", "preserveSymlinks"],
345367
"2.3": ["strict", "downlevelIteration", "init", "checkJs"],
346-
"2.2": ["jsx"],
347-
"2.1": ["extends", "alwaysStrict"],
368+
"2.2": ["jsxFactory", "plugins"],
369+
"2.1": ["extends", "alwaysStrict", "importHelpers"],
348370
"2.0": [
371+
"baseUrl",
349372
"declarationDir",
350-
"skipLibCheck",
351-
"noUnusedLocals",
352-
"noUnusedParameters",
373+
"disableSizeLimit",
374+
"exclude",
375+
"extendedDiagnostics",
376+
"include",
353377
"lib",
354-
"strictNullChecks",
378+
"listEmittedFiles",
379+
"maxNodeModuleJsDepth",
355380
"noImplicitThis",
381+
"noUnusedLocals",
382+
"noUnusedParameters",
383+
"paths",
356384
"rootDirs",
385+
"skipLibCheck",
386+
"strictNullChecks",
357387
"traceResolution",
358-
"include",
388+
"types",
389+
"typeRoots",
359390
],
360391
"1.8": [
361392
"allowJs",
362393
"allowSyntheticDefaultImports",
363394
"allowUnreachableCode",
364395
"allowUnusedLabels",
396+
"forceConsistentCasingInFileNames",
365397
"noImplicitReturns",
398+
"noImplicitUseStrict",
366399
"noFallthroughCasesInSwitch",
400+
"pretty",
401+
"reactNamespace",
402+
],
403+
"1.6": [
404+
"jsx",
405+
"moduleResolution",
406+
"outFile",
407+
"skipDefaultLibCheck",
408+
"suppressExcessPropertyErrors",
409+
],
410+
"1.5": [
411+
"emitDecoratorMetadata",
412+
"experimentalDecorators",
413+
"files",
414+
"inlineSourceMap",
415+
"inlineSources",
416+
"isolatedModules",
417+
"listFiles",
418+
"newLine",
419+
"noEmit",
420+
"noEmitHelpers",
421+
"rootDir",
422+
"stripInternal",
423+
],
424+
"1.4": ["noEmitOnError", "preserveConstEnums", "suppressImplicitAnyIndexErrors"],
425+
"1.0": [
426+
"charset",
427+
"declaration",
428+
"diagnostics",
429+
"emitBOM",
430+
"mapRoot",
431+
"module",
432+
"noErrorTruncation",
433+
"noImplicitAny",
434+
"noLib",
435+
"noResolve",
436+
"out",
437+
"outDir",
438+
"removeComments",
439+
"sourceMap",
440+
"sourceRoot",
441+
"target",
367442
],
368-
"1.5": ["inlineSourceMap", "noEmitHelpers", "newLine", "inlineSources", "rootDir"],
369-
"1.4": ["noEmitOnError"],
370-
"1.0": ["declaration", "target", "module", "outFile"],
371443
};
372444

373445
export const additionalOptionDescriptors: Record<string, { categoryCode: number }> = {

0 commit comments

Comments
 (0)