Skip to content

Commit

Permalink
feat(config): shared prettier config to be used in monorepo
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Shatford <[email protected]>
  • Loading branch information
jordanshatford committed Sep 11, 2023
1 parent 7f5a8fb commit 15d9bc7
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 55 deletions.
9 changes: 1 addition & 8 deletions apps/web/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
"@yd/config/prettier"
3 changes: 0 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
"@yd/config": "workspace:*",
"autoprefixer": "^10.4.15",
"postcss": "^8.4.29",
"prettier": "^3.0.3",
"prettier-plugin-svelte": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.4",
"svelte": "^4.2.0",
"svelte-check": "^3.5.1",
"tailwindcss": "^3.3.3",
Expand Down
7 changes: 1 addition & 6 deletions packages/client/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
}
"@yd/config/prettier"
1 change: 0 additions & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"devDependencies": {
"@yd/config": "workspace:*",
"openapi-typescript-codegen": "^0.25.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
}
}
6 changes: 5 additions & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"./tailwind": "./tailwind.config.js",
"./eslint/typescript": "./eslint/typescript.js",
"./eslint/svelte": "./eslint/svelte.js",
"./typescript": "./typescript.json"
"./prettier": "./prettier/index.js",
"./typescript": "./typescript.json"
},
"scripts": {},
"devDependencies": {
Expand All @@ -16,6 +17,9 @@
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-svelte": "^2.33.0",
"prettier": "^3.0.3",
"prettier-plugin-svelte": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.4",
"tailwindcss": "^3.3.3"
}
}
9 changes: 9 additions & 0 deletions packages/config/prettier/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import("prettier").Config} */
module.exports = {
useTabs: true,
singleQuote: true,
trailingComma: "none",
printWidth: 100,
plugins: ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
overrides: [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
};
9 changes: 1 addition & 8 deletions packages/ui/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
"@yd/config/prettier"
3 changes: 0 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
"@yd/config": "workspace:*",
"autoprefixer": "^10.4.15",
"postcss": "^8.4.29",
"prettier": "^3.0.3",
"prettier-plugin-svelte": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.4",
"publint": "^0.2.2",
"svelte": "^4.2.0",
"svelte-check": "^3.5.1",
Expand Down
40 changes: 15 additions & 25 deletions pnpm-lock.yaml

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

0 comments on commit 15d9bc7

Please sign in to comment.