Repository: DefinitelyTyped/dt-mergebot
Pull request #424 (2021-09-09 17:34:55)

Ignore `target: "es6"` following the README instructions


Patch:
diff --git a/src/pr-info.ts b/src/pr-info.ts
index 2d57a0f..1dea800 100644
--- a/src/pr-info.ts
+++ b/src/pr-info.ts
@@ -370,6 +370,9 @@ configSuspicious["tsconfig.json"] = makeChecker(
         data.compilerOptions.lib = data.compilerOptions.lib.filter((value: unknown) =>
             !(typeof value === "string" && value.toLowerCase() === "dom"));
         ["baseUrl", "typeRoots", "paths", "jsx"].forEach(k => delete data.compilerOptions[k]);
+        if (typeof data.compilerOptions?.target === "string" && data.compilerOptions.target.toLowerCase() === "es6") {
+            delete data.compilerOptions.target;
+        }
         delete data.files;
     } }
 );


Test patch:
diff --git a/src/_tests/fixtures/49841/derived.json b/src/_tests/fixtures/49841/derived.json
index 1a559a4..329555d 100644
--- a/src/_tests/fixtures/49841/derived.json
+++ b/src/_tests/fixtures/49841/derived.json
@@ -25,8 +25,7 @@
         },
         {
           "path": "types/react-native-sha1/tsconfig.json",
-          "kind": "package-meta",
-          "suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) (check: `compilerOptions.target`)"
+          "kind": "package-meta-ok"
         },
         {
           "path": "types/react-native-sha1/tslint.json",
diff --git a/src/_tests/fixtures/49841/mutations.json b/src/_tests/fixtures/49841/mutations.json
index a141093..7e0da22 100644
--- a/src/_tests/fixtures/49841/mutations.json
+++ b/src/_tests/fixtures/49841/mutations.json
@@ -4,7 +4,7 @@
     "variables": {
       "input": {
         "subjectId": "MDExOlB1bGxSZXF1ZXN0NTI4OTE2Mjg5",
-        "body": "@shekari-ah Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `react-native-sha1` (*new!*) — [on npm](https://www.npmjs.com/package/react-native-sha1), [on unpkg](https://unpkg.com/browse/react-native-sha1@latest/)\n  - Config files to check:\n    - [`react-native-sha1/tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49841/files/4849e8876b0ab7adc889ccc35b55fde6f0274837#diff-579fae17725faf40efb4aac22d7bcfb2337ec7080258e4a206f5a479968d3556): not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) (check: `compilerOptions.target`)\n\n## Code Reviews\n\nThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=49841&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ❌ Continuous integration tests have failed\n * 🕐 Only a DT maintainer can approve changes when there are new packages added\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ...\n<!--typescript_bot_welcome-->"
+        "body": "@shekari-ah Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `react-native-sha1` (*new!*) — [on npm](https://www.npmjs.com/package/react-native-sha1), [on unpkg](https://unpkg.com/browse/react-native-sha1@latest/)\n\n## Code Reviews\n\nThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=49841&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ❌ Continuous integration tests have failed\n * 🕐 Only a DT maintainer can approve changes when there are new packages added\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ...\n<!--typescript_bot_welcome-->"
       }
     }
   },
@@ -14,8 +14,7 @@
       "input": {
         "labelIds": [
           "MDU6TGFiZWwyMDk2NzQzNjAw",
-          "MDU6TGFiZWw2NDY3ODg4ODg=",
-          "MDU6TGFiZWwyMTU0ODE2NTQ5"
+          "MDU6TGFiZWw2NDY3ODg4ODg="
         ],
         "labelableId": "MDExOlB1bGxSZXF1ZXN0NTI4OTE2Mjg5"
       }
diff --git a/src/_tests/fixtures/49841/result.json b/src/_tests/fixtures/49841/result.json
index a41f975..4cdd9e3 100644
--- a/src/_tests/fixtures/49841/result.json
+++ b/src/_tests/fixtures/49841/result.json
@@ -2,13 +2,12 @@
   "projectColumn": "Needs Author Action",
   "labels": [
     "The CI failed",
-    "New Definition",
-    "Check Config"
+    "New Definition"
   ],
   "responseComments": [
     {
       "tag": "welcome",
-      "status": "@shekari-ah Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `react-native-sha1` (*new!*) — [on npm](https://www.npmjs.com/package/react-native-sha1), [on unpkg](https://unpkg.com/browse/react-native-sha1@latest/)\n  - Config files to check:\n    - [`react-native-sha1/tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49841/files/4849e8876b0ab7adc889ccc35b55fde6f0274837#diff-579fae17725faf40efb4aac22d7bcfb2337ec7080258e4a206f5a479968d3556): not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) (check: `compilerOptions.target`)\n\n## Code Reviews\n\nThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=49841&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ❌ Continuous integration tests have failed\n * 🕐 Only a DT maintainer can approve changes when there are new packages added\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ..."
+      "status": "@shekari-ah Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `react-native-sha1` (*new!*) — [on npm](https://www.npmjs.com/package/react-native-sha1), [on unpkg](https://unpkg.com/browse/react-native-sha1@latest/)\n\n## Code Reviews\n\nThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=49841&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ❌ Continuous integration tests have failed\n * 🕐 Only a DT maintainer can approve changes when there are new packages added\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ..."
     },
     {
       "tag": "pinging-reviewers-others",