prettier / plugin-pug

Prettier Pug Plugin
https://prettier.github.io/plugin-pug
MIT License
196 stars 44 forks source link

Help: No parser could be inferred for file #462

Closed Permanently closed 1 year ago

Permanently commented 1 year ago

Info

Tool Version
Plugin v3.0.0
Prettier v3.0.1
Framework none
Node v18.17.0
OS linux (WSL)

Prettier config

None. (maybe this is where I'm going wrong?)

Input

npx prettier --write "**/*.pug"

Output or Error

[error] No parser could be inferred for file "/folders/here/page.pug".

Expected Output

page.js XXXms

Additional Context

Hello! New to using Prettier. Not sure if I'm getting the wrong end of the stick here, but I can't seem to prett-ify any Pug files, despite installing the top two guide commands for basic functionality. I'm not sure if I've lost the plot here; I didn't know if I could get some help?

(sorry for posting here, there doesn't seem to be a discussions tab)

Permanently commented 1 year ago

Sorry, just seen the Discussions tab now. It's been a long day.

tkafka commented 1 year ago

I'll link the relevant discussion, as I have searched for this for a bit.

The new command is npx prettier --write "**/*.pug" --plugin="@prettier/plugin-pug"