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

Issue:
VS Code settings unrelated to TSLint->ESLint should be ignored
### 🐛 Bug Report

-   `tslint-to-eslint-config` version: 0.6.0
-   ESLint version: N/A
-   Node version: N/A

#### Actual Behavior

If your `.vscode/settings.json` includes a setting that starts with `editor.`:

```json
{
    "editor.tabSize": 4,
}
```

You'll get a warning when running `tslint-to-eslint-config` that it's not known:

```
1 editor setting is not known by tslint-to-eslint-config to have an ESLint equivalent:
  * tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "editor.tabSize".
```

#### Expected Behavior

Only editor settings relevant to TSLint->ESLints should be complained about.

#### Reproduction

1. Create a directory with a `.vscode/settings.json` equivalent to the above
2. Run `tslint-to-eslint-config`

Pull request:
Ignore all unknown editor settings in conversion
## PR Checklist

-   [x] Addresses an existing issue: fixes #407
-   [x] That issue was marked as [`status: accepting prs`](https://github.com/typescript-eslint/tslint-to-eslint-config/labels/status%3A%20accepting%20prs)

## Overview

Uses an explicit allowlist for the known editor settings mentioned in the [TSLint extension's docs](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin#configuration) instead of prefix filtering.

FYI @MrCube42 

Patch:
diff --git a/package-lock.json b/package-lock.json
index 00580d1..2222ab9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3823,12 +3823,12 @@
             "dev": true
         },
         "@typescript-eslint/eslint-plugin": {
-            "version": "3.7.0",
-            "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.7.0.tgz",
-            "integrity": "sha512-4OEcPON3QIx0ntsuiuFP/TkldmBGXf0uKxPQlGtS/W2F3ndYm8Vgdpj/woPJkzUc65gd3iR+qi3K8SDQP/obFg==",
+            "version": "3.7.1",
+            "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.7.1.tgz",
+            "integrity": "sha512-3DB9JDYkMrc8Au00rGFiJLK2Ja9CoMP6Ut0sHsXp3ZtSugjNxvSSHTnKLfo4o+QmjYBJqEznDqsG1zj4F2xnsg==",
             "dev": true,
             "requires": {
-                "@typescript-eslint/experimental-utils": "3.7.0",
+                "@typescript-eslint/experimental-utils": "3.7.1",
                 "debug": "^4.1.1",
                 "functional-red-black-tree": "^1.0.1",
                 "regexpp": "^3.0.0",
@@ -3854,45 +3854,45 @@
             }
         },
         "@typescript-eslint/experimental-utils": {
-            "version": "3.7.0",
-            "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.0.tgz",
-            "integrity": "sha512-xpfXXAfZqhhqs5RPQBfAFrWDHoNxD5+sVB5A46TF58Bq1hRfVROrWHcQHHUM9aCBdy9+cwATcvCbRg8aIRbaHQ==",
+            "version": "3.7.1",
+            "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.1.tgz",
+            "integrity": "sha512-TqE97pv7HrqWcGJbLbZt1v59tcqsSVpWTOf1AqrWK7n8nok2sGgVtYRuGXeNeLw3wXlLEbY1MKP3saB2HsO/Ng==",
             "dev": true,
             "requires": {
                 "@types/json-schema": "^7.0.3",
-                "@typescript-eslint/types": "3.7.0",
-                "@typescript-eslint/typescript-estree": "3.7.0",
+                "@typescript-eslint/types": "3.7.1",
+                "@typescript-eslint/typescript-estree": "3.7.1",
                 "eslint-scope": "^5.0.0",
                 "eslint-utils": "^2.0.0"
             }
         },
         "@typescript-eslint/parser": {
-            "version": "3.7.0",
-            "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.7.0.tgz",
-            "integrity": "sha512-2LZauVUt7jAWkcIW7djUc3kyW+fSarNEuM3RF2JdLHR9BfX/nDEnyA4/uWz0wseoWVZbDXDF7iF9Jc342flNqQ==",
+            "version": "3.7.1",
+            "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.7.1.tgz",
+            "integrity": "sha512-W4QV/gXvfIsccN8225784LNOorcm7ch68Fi3V4Wg7gmkWSQRKevO4RrRqWo6N/Z/myK1QAiGgeaXN57m+R/8iQ==",
             "dev": true,
             "requires": {
                 "@types/eslint-visitor-keys": "^1.0.0",
-                "@typescript-eslint/experimental-utils": "3.7.0",
-                "@typescript-eslint/types": "3.7.0",
-                "@typescript-eslint/typescript-estree": "3.7.0",
+                "@typescript-eslint/experimental-utils": "3.7.1",
+                "@typescript-eslint/types": "3.7.1",
+                "@typescript-eslint/typescript-estree": "3.7.1",
                 "eslint-visitor-keys": "^1.1.0"
             }
         },
         "@typescript-eslint/types": {
-            "version": "3.7.0",
-            "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.7.0.tgz",
-            "integrity": "sha512-reCaK+hyKkKF+itoylAnLzFeNYAEktB0XVfSQvf0gcVgpz1l49Lt6Vo9x4MVCCxiDydA0iLAjTF/ODH0pbfnpg==",
+            "version": "3.7.1",
+            "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.7.1.tgz",
+            "integrity": "sha512-PZe8twm5Z4b61jt7GAQDor6KiMhgPgf4XmUb9zdrwTbgtC/Sj29gXP1dws9yEn4+aJeyXrjsD9XN7AWFhmnUfg==",
             "dev": true
         },
         "@typescript-eslint/typescript-estree": {
-            "version": "3.7.0",
-            "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.0.tgz",
-            "integrity": "sha512-xr5oobkYRebejlACGr1TJ0Z/r0a2/HUf0SXqPvlgUMwiMqOCu/J+/Dr9U3T0IxpE5oLFSkqMx1FE/dKaZ8KsOQ==",
+            "version": "3.7.1",
+            "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.1.tgz",
+            "integrity": "sha512-m97vNZkI08dunYOr2lVZOHoyfpqRs0KDpd6qkGaIcLGhQ2WPtgHOd/eVbsJZ0VYCQvupKrObAGTOvk3tfpybYA==",
             "dev": true,
             "requires": {
-                "@typescript-eslint/types": "3.7.0",
-                "@typescript-eslint/visitor-keys": "3.7.0",
+                "@typescript-eslint/types": "3.7.1",
+                "@typescript-eslint/visitor-keys": "3.7.1",
                 "debug": "^4.1.1",
                 "glob": "^7.1.6",
                 "is-glob": "^4.0.1",
@@ -3919,9 +3919,9 @@
             }
         },
         "@typescript-eslint/visitor-keys": {
-            "version": "3.7.0",
-            "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.0.tgz",
-            "integrity": "sha512-k5PiZdB4vklUpUX4NBncn5RBKty8G3ihTY+hqJsCdMuD0v4jofI5xuqwnVcWxfv6iTm2P/dfEa2wMUnsUY8ODw==",
+            "version": "3.7.1",
+            "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.1.tgz",
+            "integrity": "sha512-xn22sQbEya+Utj2IqJHGLA3i1jDzR43RzWupxojbSWnj3nnPLavaQmWe5utw03CwYao3r00qzXfgJMGNkrzrAA==",
             "dev": true,
             "requires": {
                 "eslint-visitor-keys": "^1.1.0"
diff --git a/package.json b/package.json
index aa3eb46..70c6ee7 100644
--- a/package.json
+++ b/package.json
@@ -28,8 +28,8 @@
         "@types/glob": "7.1.3",
         "@types/jest": "26.0.7",
         "@types/node": "12.12.21",
-        "@typescript-eslint/eslint-plugin": "3.7.0",
-        "@typescript-eslint/parser": "3.7.0",
+        "@typescript-eslint/eslint-plugin": "3.7.1",
+        "@typescript-eslint/parser": "3.7.1",
         "babel-jest": "26.1.0",
         "eslint": "7.5.0",
         "husky": "4.2.5",
diff --git a/src/editorSettings/convertEditorSettings.ts b/src/editorSettings/convertEditorSettings.ts
index 809adae..043b76f 100644
--- a/src/editorSettings/convertEditorSettings.ts
+++ b/src/editorSettings/convertEditorSettings.ts
@@ -4,7 +4,14 @@ import { convertEditorSetting } from "./convertEditorSetting";
 import { EditorSettingConverter } from "./converter";
 import { EditorSetting } from "./types";
 
-const EDITOR_SETTINGS_PREFIX = "editor.";
+const knownEditorSettings = new Set([
+    "tslint.configFile",
+    "tslint.jsEnable",
+    "tslint.ignoreDefinitionFiles",
+    "tslint.exclude",
+    "tslint.alwaysShowRuleFailuresAsWarnings",
+    "tslint.suppressWhileTypeErrorsPresent",
+]);
 
 export type ConvertEditorSettingsDependencies = {
     converters: Map<string, EditorSettingConverter>;
@@ -30,7 +37,7 @@ export const convertEditorSettings = (
     for (const [configurationName, value] of Object.entries(rawEditorConfiguration)) {
         // Configurations other than editor settings will be ignored.
         // See: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin#configuration
-        if (!configurationName.startsWith(EDITOR_SETTINGS_PREFIX)) {
+        if (!knownEditorSettings.has(configurationName)) {
             continue;
         }
 


Test patch:
diff --git a/src/editorSettings/convertEditorSettings.test.ts b/src/editorSettings/convertEditorSettings.test.ts
index b1d5bd8..1c4a0b2 100644
--- a/src/editorSettings/convertEditorSettings.test.ts
+++ b/src/editorSettings/convertEditorSettings.test.ts
@@ -13,29 +13,26 @@ describe("convertEditorSettings", () => {
         };
 
         // Act
-        const { converted, missing, failed } = convertEditorSettings(
-            { converters },
-            editorConfiguration,
-        );
+        const result = convertEditorSettings({ converters }, editorConfiguration);
 
         // Assert
-        expect(converted.size).toEqual(0);
-        expect(missing.length).toEqual(0);
-        expect(failed.length).toEqual(0);
+        expect(result).toEqual({
+            converted: new Map(),
+            failed: [],
+            missing: [],
+        });
     });
 
     it("skips a configuration if not an editor setting", () => {
         // Arrange
-        const conversionResult: EditorSettingConversionResult = {
+        const { editorSetting, converters } = setupConversionEnvironment({
             settings: [
                 {
                     editorSettingName: "editor.eslint-setting-a",
                     value: "a",
                 },
             ],
-        };
-
-        const { editorSetting, converters } = setupConversionEnvironment(conversionResult);
+        });
 
         const editorConfiguration = {
             notAnEditorSetting: "a",
@@ -44,15 +41,22 @@ describe("convertEditorSettings", () => {
         };
 
         // Act
-        const { converted, missing, failed } = convertEditorSettings(
-            { converters },
-            editorConfiguration,
-        );
+        const result = convertEditorSettings({ converters }, editorConfiguration);
 
         // Assert
-        expect(converted.size).toEqual(1);
-        expect(missing.length).toEqual(0);
-        expect(failed.length).toEqual(0);
+        expect(result).toEqual({
+            converted: new Map([
+                [
+                    "editor.eslint-setting-a",
+                    {
+                        editorSettingName: "editor.eslint-setting-a",
+                        value: "a",
+                    },
+                ],
+            ]),
+            failed: [],
+            missing: [],
+        });
     });
 
     it("marks a setting as missing when its converter returns undefined", () => {
@@ -60,13 +64,17 @@ describe("convertEditorSettings", () => {
         const { editorSetting, converters } = setupConversionEnvironment();
 
         // Act
-        const { missing } = convertEditorSettings(
+        const result = convertEditorSettings(
             { converters },
             { [editorSetting.editorSettingName]: editorSetting },
         );
 
         // Assert
-        expect(missing).toEqual([{ editorSettingName: editorSetting.editorSettingName }]);
+        expect(result).toEqual({
+            converted: new Map(),
+            failed: [],
+            missing: [{ editorSettingName: editorSetting.editorSettingName }],
+        });
     });
 
     it("marks a conversion as failed when returned a conversion error", () => {
@@ -76,45 +84,50 @@ describe("convertEditorSettings", () => {
         converters.set(editorSetting.editorSettingName, () => conversionError);
 
         // Act
-        const { failed } = convertEditorSettings(
+        const result = convertEditorSettings(
             { converters },
             { [editorSetting.editorSettingName]: editorSetting },
         );
 
         // Assert
-        expect(failed).toEqual([conversionError]);
+        expect(result).toEqual({
+            converted: new Map(),
+            failed: [conversionError],
+            missing: [],
+        });
     });
 
     it("marks a converted setting name as converted when a conversion has settings", () => {
         // Arrange
-        const conversionResult: EditorSettingConversionResult = {
+        const { editorSetting, converters } = setupConversionEnvironment({
             settings: [
                 {
-                    editorSettingName: "editor.eslint-setting-a",
+                    editorSettingName: "eslint.configFile",
                     value: "a",
                 },
             ],
-        };
-        const { editorSetting, converters } = setupConversionEnvironment(conversionResult);
+        });
 
         // Act
-        const { converted } = convertEditorSettings(
+        const result = convertEditorSettings(
             { converters },
             { [editorSetting.editorSettingName]: editorSetting.value },
         );
 
         // Assert
-        expect(converted).toEqual(
-            new Map([
+        expect(result).toEqual({
+            converted: new Map([
                 [
-                    "editor.eslint-setting-a",
+                    "eslint.configFile",
                     {
-                        editorSettingName: "editor.eslint-setting-a",
+                        editorSettingName: "eslint.configFile",
                         value: "a",
                     },
                 ],
             ]),
-        );
+            failed: [],
+            missing: [],
+        });
     });
 });
 
@@ -127,7 +140,7 @@ function setupConversionEnvironment(conversionResult?: EditorSettingConversionRe
 
 function createSampleEditorSetting(): EditorSetting {
     return {
-        editorSettingName: "editor.tslint-editor-setting-a",
+        editorSettingName: "tslint.configFile",
         value: "a",
     };
 }