From 654cbd977940b367962500f3d89dd28b21383704 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 2 Nov 2015 13:20:48 -0800 Subject: [PATCH] Just name the option 'pretty' for now. --- src/compiler/commandLineParser.ts | 17 ++++++----------- src/compiler/diagnosticMessages.json | 6 +----- src/compiler/tsc.ts | 2 +- src/compiler/types.ts | 2 +- 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index ee1a36ec45e..141ab85929e 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -21,17 +21,6 @@ namespace ts { name: "diagnostics", type: "boolean", }, - { - name: "diagnosticStyle", - paramType: Diagnostics.KIND, - description: Diagnostics.Specify_diagnostic_printing_style_Colon_simple_default_or_pretty, - type: { - "simple": DiagnosticStyle.Simple, - "pretty": DiagnosticStyle.Pretty, - }, - error: Diagnostics.Argument_for_diagnosticStyle_must_be_simple_or_pretty, - experimental: true, - }, { name: "emitBOM", type: "boolean" @@ -162,6 +151,12 @@ namespace ts { type: "boolean", description: Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code }, + { + name: "pretty", + paramType: Diagnostics.KIND, + description: Diagnostics.Stylize_errors_and_messages_using_colors_if_available_experimental, + type: "boolean" + }, { name: "project", shortName: "p", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 0abe92299bf..ed17c2a77b0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2286,14 +2286,10 @@ "category": "Message", "code": 6072 }, - "Specify diagnostic printing style: 'simple' (default) or 'pretty'.": { + "Stylize errors and messages using colors if available. (experimental)": { "category": "Message", "code": 6073 }, - "Argument for '--diagnosticStyle' must be 'simple' or 'pretty'.": { - "category": "Error", - "code": 6074 - }, "Specify JSX code generation: 'preserve' or 'react'": { "category": "Message", diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index cedfacba9e3..66a6cbb65bd 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -374,7 +374,7 @@ namespace ts { compilerHost.fileExists = cachedFileExists; } - if (compilerOptions.diagnosticStyle === DiagnosticStyle.Pretty) { + if (compilerOptions.pretty) { reportDiagnostic = reportDiagnosticWithColorAndContext; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ca8a0014924..363c3a4a29f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2053,7 +2053,6 @@ namespace ts { charset?: string; declaration?: boolean; diagnostics?: boolean; - /* @internal */diagnosticStyle?: DiagnosticStyle; emitBOM?: boolean; help?: boolean; init?: boolean; @@ -2076,6 +2075,7 @@ namespace ts { outFile?: string; outDir?: string; preserveConstEnums?: boolean; + /* @internal */ pretty?: DiagnosticStyle; project?: string; removeComments?: boolean; rootDir?: string;