Skip to content

Commit

Permalink
Remove sync prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
parse committed Apr 24, 2024
1 parent 3c7e6a8 commit 80925b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 44 deletions.
40 changes: 0 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
},
"prettier": "./index.js",
"devDependencies": {
"@prettier/sync": "^0.5.2",
"@types/node": "^20.12.7",
"prettier": "^3.2.5",
"vite": "^5.2.10",
Expand Down
6 changes: 3 additions & 3 deletions test/format.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import fs from "node:fs/promises";
import baseConfig from "../index";
import synchronizedPrettier from "@prettier/sync";
import prettier from "prettier";

export const format = async (file: string, config = baseConfig) => {
try {
const buffer = await fs.readFile(file);
const code = buffer.toString("utf8");

const result = synchronizedPrettier.format(code, {
const result = await prettier.format(code, {
...config,
file,
filepath: file,
parser: "typescript",
});

Expand Down

0 comments on commit 80925b3

Please sign in to comment.