Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 3c0650d

Browse files
committed
Remove Prettier
1 parent ed94b1c commit 3c0650d

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"fs-extra": "^9.0.1",
2525
"graphql": "^14.5.8",
2626
"node-fetch": "^2.6.1",
27-
"prettier": "^2.2.0",
2827
"prettyjson": "^1.2.1",
2928
"yargs": "^16.2.0"
3029
},

src/pr-info.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import * as comment from "./util/comment";
1616
import * as urls from "./urls";
1717
import * as HeaderParser from "@definitelytyped/header-parser";
1818
import * as jsonDiff from "fast-json-patch";
19-
import * as prettier from "prettier";
2019

2120
const CriticalPopularityThreshold = 5_000_000;
2221
const NormalPopularityThreshold = 200_000;
@@ -468,11 +467,10 @@ function makeChecker(expectedForm: any, expectedFormUrl: string, options?: { par
468467

469468
// Suggest the different lines to the author
470469
function makeSuggestion() {
471-
const suggestionLines = (
472-
Object.keys(suggestion).length <= 1
473-
? prettier.format(JSON.stringify(suggestion), { tabWidth: 4, filepath: ".json" })
474-
: JSON.stringify(suggestion, undefined, 4) + "\n"
475-
).split(/^/m);
470+
const text = JSON.stringify(suggestion, undefined, 4);
471+
const suggestionLines = Object.keys(suggestion).length === 1
472+
? [text.replace(/\n */g, " ") + "\n"]
473+
: (text + "\n").split(/^/m);
476474
// "^" will match inside LineTerminatorSequence so
477475
// "\r\n".split(/^/m) is two lines. Sigh.
478476
// https://tc39.es/ecma262/#_ref_7303:~:text=the%20character%20Input%5Be%20%2D%201%5D%20is%20one%20of%20LineTerminator

0 commit comments

Comments
 (0)