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

Commit d467d32

Browse files
committed
Remove Prettier
1 parent 5b4eda2 commit d467d32

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
@@ -29,7 +29,6 @@
2929
"fs-extra": "^9.0.1",
3030
"graphql": "^14.5.8",
3131
"node-fetch": "^2.6.1",
32-
"prettier": "^2.2.0",
3332
"prettyjson": "^1.2.1",
3433
"typescript": "^4.1.3",
3534
"yargs": "^16.2.0"

src/pr-info.ts

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

2221
const CriticalPopularityThreshold = 5_000_000;
2322
const NormalPopularityThreshold = 200_000;
@@ -471,11 +470,10 @@ function makeChecker(expectedForm: any, expectedFormUrl: string, options?: { par
471470

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

0 commit comments

Comments
 (0)