From 057582121f232c54dc7683e093a37050befb3fc5 Mon Sep 17 00:00:00 2001 From: JounQin Date: Wed, 14 Jul 2021 18:19:12 +0800 Subject: [PATCH 1/2] fix: `typeof` results `undefined` string --- packages/typescript-estree/src/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 904bb054fdf..6b0d7557448 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -346,7 +346,7 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { function warnAboutTSVersion(): void { if (!isRunningSupportedTypeScriptVersion && !warnedAboutTSVersion) { - const isTTY = typeof process === undefined ? false : process.stdout?.isTTY; + const isTTY = typeof process === 'undefined' ? false : process.stdout?.isTTY; if (isTTY) { const border = '============='; const versionWarning = [ From 6dd5abcbdd11b076792db175e9c006ab67d6ea27 Mon Sep 17 00:00:00 2001 From: JounQin Date: Wed, 14 Jul 2021 10:35:11 +0000 Subject: [PATCH 2/2] chore: prettier format --- packages/typescript-estree/src/parser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 6b0d7557448..5eb99deb9fc 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -346,7 +346,8 @@ function applyParserOptionsToExtra(options: TSESTreeOptions): void { function warnAboutTSVersion(): void { if (!isRunningSupportedTypeScriptVersion && !warnedAboutTSVersion) { - const isTTY = typeof process === 'undefined' ? false : process.stdout?.isTTY; + const isTTY = + typeof process === 'undefined' ? false : process.stdout?.isTTY; if (isTTY) { const border = '============='; const versionWarning = [