docs icon indicating copy to clipboard operation
docs copied to clipboard

Prettier plugin content is incorrect.

Open chun37 opened this issue 1 year ago β€’ 1 comments

πŸ“š Subject area/topic

Prettier

πŸ“‹ Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/editor-setup/

πŸ“‹ Description of content that is out-of-date or incorrect

Prettier will then automatically detect the plugin and use it to process .astro files when you run it: it is written like this.

However, it seems that automatic detection of plugins has been discontinued since Prettier v3. (https://github.com/withastro/docs/pull/7507)

If the plugin is not automatically detected, I think automatically detect is a lie. I think this part needs to be deleted.

πŸ–₯️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

chun37 avatar May 10 '24 19:05 chun37

That's a great observation, FixitπŸ› οΈ πŸ˜„ Adding in more: This can use Starlight Steps Rough Example:

1. Installation Tabs (npm/pnpm/yarn)
2. Create `.prettierrc` with plugins option set to `prettier-plugin-astro`
3. Start formatting with `prettier --write .`

at-the-vr avatar May 11 '24 04:05 at-the-vr

Just bumping this for visibility! Would happily take a PR to delete the inaccurate statement, or to add <Steps> like @at-the-vr mentioned!

sarah11918 avatar Jun 15 '24 14:06 sarah11918