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

Issue:
Always include the typescript-eslint parser
Right now, in `createNewConfiguration`, the following will include the `typescript-eslint` plugin and parser if there are missing rules:

```js
...(conversionResults.missing.length && {
    plugins: ["@typescript-eslint/tslint"],
    parser: "@typescript-eslint/parser",
    parserOptions: {
        project: "tsconfig.json",
    },
}),
```

This is incorrect. Many rules within `@typescript-eslint/` actually do need those settings. Converters that output those rules should be able to request them.

Pull request description:
Always included typescript-eslint parser
Fixes #12.

Patch:
diff --git a/src/creation/createNewConfiguration.ts b/src/creation/createNewConfiguration.ts
index e637dce..c02cfa2 100644
--- a/src/creation/createNewConfiguration.ts
+++ b/src/creation/createNewConfiguration.ts
@@ -8,12 +8,12 @@ export const createNewConfiguration = async (
     writeFile: WriteFile,
 ) => {
     const output = {
+        parser: "@typescript-eslint/parser",
+        parserOptions: {
+            project: "tsconfig.json",
+        },
         ...(conversionResults.missing.length && {
             plugins: ["@typescript-eslint/tslint"],
-            parser: "@typescript-eslint/parser",
-            parserOptions: {
-                project: "tsconfig.json",
-            },
         }),
         rules: formatConvertedRules(conversionResults),
     };


Test patch:
diff --git a/src/creation/createNewConfiguration.test.ts b/src/creation/createNewConfiguration.test.ts
index c684305..1813313 100644
--- a/src/creation/createNewConfiguration.test.ts
+++ b/src/creation/createNewConfiguration.test.ts
@@ -3,7 +3,7 @@ import { createNewConfiguration } from "./createNewConfiguration";
 import { ConfigConversionResults } from "../rules/convertRules";
 
 describe("createNewConfiguration", () => {
-    it("writes only formatted rules when there are no missing rules", async () => {
+    it("excludes the tslint plugin when there are no missing rules", async () => {
         // Arrange
         const conversionResults: ConfigConversionResults = {
             ...emptyConversionResults,
@@ -17,7 +17,17 @@ describe("createNewConfiguration", () => {
         // Assert
         expect(writeFile).toHaveBeenLastCalledWith(
             ".eslintrc.json",
-            JSON.stringify({ rules: {} }, undefined, 4),
+            JSON.stringify(
+                {
+                    parser: "@typescript-eslint/parser",
+                    parserOptions: {
+                        project: "tsconfig.json",
+                    },
+                    rules: {},
+                },
+                undefined,
+                4,
+            ),
         );
     });
 
@@ -44,11 +54,11 @@ describe("createNewConfiguration", () => {
             ".eslintrc.json",
             JSON.stringify(
                 {
-                    plugins: ["@typescript-eslint/tslint"],
                     parser: "@typescript-eslint/parser",
                     parserOptions: {
                         project: "tsconfig.json",
                     },
+                    plugins: ["@typescript-eslint/tslint"],
                     rules: {
                         "@typescript-eslint/tslint/config": [
                             "error",