Skip to content

Commit

Permalink
chore: format with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jun 6, 2023
1 parent e975b93 commit b5d55ff
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"scripts": {
"build": "unbuild",
"dev": "vitest dev",
"lint": "eslint --ext .ts,.js,.mjs,.cjs .",
"lint": "eslint --ext .ts,.js,.mjs,.cjs . && prettier -c src test",
"lint:fix": "eslint --ext .ts,.js,.mjs,.cjs . --fix && prettier -w src test",
"prepack": "unbuild",
"release": "pnpm test && pnpm build && changelogen --release --push && pnpm publish",
"test": "pnpm lint && vitest run --coverage"
Expand All @@ -39,6 +40,7 @@
"eslint-config-unjs": "^0.2.1",
"jiti": "^1.18.2",
"pathe": "^1.1.1",
"prettier": "^2.8.8",
"typescript": "^5.1.3",
"unbuild": "^1.2.1",
"vitest": "^0.32.0"
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

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

6 changes: 4 additions & 2 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ export async function addDependency(
const args = [
options.packageManager.name === "npm" ? "install" : "add",
options.workspace
? (options.packageManager.name === "yarn" ? "-W" : "-w")
: "",
? options.packageManager.name === "yarn" // eslint-disable-line unicorn/no-nested-ternary
? "-W"
: "-w"
: "",
options.dev ? "-D" : "",
name,
].filter(Boolean);
Expand Down
9 changes: 5 additions & 4 deletions test/fixtures/pnpm/pnpm-lock.yaml

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

0 comments on commit b5d55ff

Please sign in to comment.