Skip to content

Commit

Permalink
feat: support for Prettier 3 (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Jul 11, 2023
1 parent d232bf6 commit 94ed904
Show file tree
Hide file tree
Showing 16 changed files with 1,504 additions and 1,094 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-actors-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'prettier-plugin-astro': minor
---

Migrated the plugin to Prettier 3's new APIs. It's unfortunately not possible for a plugin to support both version 2 and 3 of Prettier. As such, from this version on, only Prettier 3 is supported.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm i --save-dev prettier-plugin-astro prettier

### Recommended configuration

For optimal compatibility with the different package managers and Prettier plugins, we recommend manually specifying your plugins and the parser to use for Astro files in your Prettier config as shown in the example below:
For optimal compatibility with the different package managers and Prettier plugins, we recommend manually specifying the parser to use for Astro files in your Prettier config as shown in the example below:

```js
module.exports = {
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "prettier-plugin-astro",
"version": "0.10.0",
"type": "commonjs",
"type": "module",
"description": "A Prettier Plugin for formatting Astro files",
"main": "dist/index.js",
"files": [
Expand All @@ -12,7 +12,7 @@
"node": "^14.15.0 || >=16.0.0",
"pnpm": ">=7.14.0"
},
"packageManager": "pnpm@7.14.0",
"packageManager": "pnpm@8.6.2",
"homepage": "https://github.com/withastro/prettier-plugin-astro/",
"issues": {
"url": "https://github.com/withastro/prettier-plugin-astro/issues"
Expand Down Expand Up @@ -40,26 +40,26 @@
"release": "pnpm build && changeset publish"
},
"dependencies": {
"@astrojs/compiler": "^1.5.0",
"prettier": "^2.8.8",
"@astrojs/compiler": "^1.5.5",
"prettier": "^3.0.0",
"sass-formatter": "^0.7.6"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-typescript": "^11.1.1",
"@types/node": "^20.2.5",
"@types/prettier": "^2.7.3",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@vitest/ui": "^0.31.3",
"eslint": "^8.41.0",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "5.0.0-alpha.2",
"eslint-plugin-prettier-doc": "^1.1.0",
"rollup": "^3.23.0",
"tslib": "^2.5.2",
"typescript": "^5.0.4",
"vitest": "^0.31.3"
"vitest": "^0.31.3",
"vite": "^4.4.3"
}
}
Loading

0 comments on commit 94ed904

Please sign in to comment.