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

Commit 8a76ccd

Browse files
committed
Remove Prettier
1 parent 103a5cf commit 8a76ccd

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

package.json

-1
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

+4-6
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;
@@ -469,11 +468,10 @@ function makeChecker(expectedForm: any, expectedFormUrl: string, options?: { par
469468

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

0 commit comments

Comments
 (0)