Repository: JoshuaKGoldberg/tslint-to-eslint-config (ts)

Issue:
TypeScript configuration files can't have comments
### 🐛 Bug Report

-   `tslint-to-eslint-config` version: 0.1.8
-   ESLint version: N/A
-   Node version: N/A

#### Actual Behavior

If you've put non-JSON things in your `tsconfig.json`, such as comments, `tslint-to-eslint-config --typescript tsconfig.json` won't load the file. This is because the file is printed with `cat` on the CLI, then passed to `JSON.parse` in code. 

#### Expected Behavior

TypeScript supports comments. We should too!

#### Reproduction

1. Create a `tsconfig.json` with comments in it
2. Run `tslint-to-eslint-config --typescript tsconfig.json`

Pull request description:
Used tsc --showConfig instead of cat for --typescript configs
## PR Checklist

-   [x] Addresses an existing issue: fixes #85
-   [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/tslint-to-eslint-config/labels/status%3A%20accepting%20prs)

## Overview

Per #85, TypeScript has a native `--showConfig` flag we can use as of version 3.2. This PR uses that instead of `cat` to print TypeScript configuration files.

Patch:
diff --git a/src/input/findTypeScriptConfiguration.ts b/src/input/findTypeScriptConfiguration.ts
index f0e33ca..27badf3 100644
--- a/src/input/findTypeScriptConfiguration.ts
+++ b/src/input/findTypeScriptConfiguration.ts
@@ -19,7 +19,7 @@ export const findTypeScriptConfiguration = async (
 ): Promise<TypeScriptConfiguration | Error> => {
     const rawConfiguration = await findConfiguration<TypeScriptConfiguration>(
         dependencies.exec,
-        "cat",
+        "tsc --showConfig -p",
         config || "./tsconfig.json",
     );
 


Test patch:
diff --git a/src/input/findTypeScriptConfiguration.test.ts b/src/input/findTypeScriptConfiguration.test.ts
index ac9e8c7..befb8d3 100644
--- a/src/input/findTypeScriptConfiguration.test.ts
+++ b/src/input/findTypeScriptConfiguration.test.ts
@@ -26,7 +26,7 @@ describe("findTypeScriptConfiguration", () => {
         await findTypeScriptConfiguration(dependencies, undefined);
 
         // Assert
-        expect(dependencies.exec).toHaveBeenLastCalledWith(`cat "./tsconfig.json"`);
+        expect(dependencies.exec).toHaveBeenLastCalledWith(`tsc --showConfig -p "./tsconfig.json"`);
     });
 
     it("includes a configuration file in the TypeScript command when one is provided", async () => {
@@ -38,7 +38,9 @@ describe("findTypeScriptConfiguration", () => {
         await findTypeScriptConfiguration(dependencies, config);
 
         // Assert
-        expect(dependencies.exec).toHaveBeenLastCalledWith(`cat "./custom/tsconfig.json"`);
+        expect(dependencies.exec).toHaveBeenLastCalledWith(
+            `tsc --showConfig -p "./custom/tsconfig.json"`,
+        );
     });
 
     it("applies TypeScript defaults when none are provided", async () => {