Skip to content

Commit

Permalink
feat: add prettier plugin for astro
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Jan 1, 2024
1 parent 25b92a9 commit 76668c2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"prettier": "./prettier",
"dependencies": {
"prettier-plugin-astro": "0.12.3",
"prettier-plugin-packagejson": "2.4.5"
},
"devDependencies": {
Expand Down
32 changes: 32 additions & 0 deletions pnpm-lock.yaml

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

9 changes: 5 additions & 4 deletions prettier/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* Explicitly define config options that can be overriden by an .editorconfig
*
* Ref: https://github.com/prettier/prettier/blob/main/docs/configuration.md#editorconfig
*
* @type {import("prettier").Config}
*/
module.exports = {
endOfLine: 'lf',
trailingComma: "all",
arrowParens: "avoid",
trailingComma: 'all',
arrowParens: 'avoid',
semi: true,
useTabs: false,
singleQuote: true,
tabWidth: 2,
printWidth: 75,
plugins: ['prettier-plugin-packagejson'],
plugins: ['prettier-plugin-packagejson', 'prettier-plugin-astro'],
};

0 comments on commit 76668c2

Please sign in to comment.