Skip to content

Commit

Permalink
[fix] setup prettier plugin-search-dirs so that it works with pnpm (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikg authored Aug 20, 2022
1 parent b335f38 commit 0842fb3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-tools-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

setup prettier plugin-search-dirs to enable use with pnpm
4 changes: 2 additions & 2 deletions packages/create-svelte/shared/+eslint+prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"eslint-config-prettier": "^8.3.0"
},
"scripts": {
"lint": "prettier --check --plugin-search-dir=. . && eslint .",
"format": "prettier --write --plugin-search-dir=. ."
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
}
}
4 changes: 3 additions & 1 deletion packages/create-svelte/shared/+prettier/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
"printWidth": 100,
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
4 changes: 2 additions & 2 deletions packages/create-svelte/shared/-eslint+prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"scripts": {
"lint": "prettier --check --plugin-search-dir=. .",
"format": "prettier --write --plugin-search-dir=. ."
"lint": "prettier --check .",
"format": "prettier --write ."
}
}

0 comments on commit 0842fb3

Please sign in to comment.