Extension 'Prettier - Code Formatter' cannot format html when using custom plugin
See original GitHub issueI’ve developed a plugin for Prettier available on NPM as prettier-plugin-tailwind-classes-sorter
.
When trying to use this in VSCode, I receive an error:
Extension ‘Prettier - Code Formatter’ cannot format index.html
But the plugin works when using Prettier cli with ./node_modules/.bin/prettier ./index.html
To reproduce, in an empty project:
yarn add --dev prettier prettier-plugin-tailwind-classes-sorter
echo "module.exports={theme:{},variants:{},plugins:[]}" > ./tailwind.config.js
echo "<html><body class="w-full container"></body></html>" > ./index.html
Then restart VSCode.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Prettier not formatting HTML files in VS Code - Stack Overflow
I simply solved it by right-clicking in the file, select 'Format Document with' and choose 'prettier ...
Read more >Prettier extension not working on HTML files : r/vscode - Reddit
First make sure that you don't have multiple extensions to format html files. · If that didn't help you should inspect your settings....
Read more >Prettier - Code formatter - Visual Studio Marketplace
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that ......
Read more >How to fix Prettier Extension not working issue in VS CODE
Your browser can't play this video. Learn more. Switch camera.
Read more >VS Code - You don't need a formatting ... - DEV Community
The built-in CSS extension now ships with a formatter. ... I don't use React, so I can't comment how well React code is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, I forgot to include that… I’ve updated the original issue comment.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.