-
-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode Prettier 10.1.0 - doesn't work with angular Angular Control Syntax #3334
Comments
The same problem here, I needed to disable the plugin, with @switch I have the same behaviour. Horrible and really hard to read. |
Another problem with the current VSCode Extension is: Having something like this
results in
In the prettier playground it works as expected. |
I use prettier inside eslint, so i tried this : {
"files": ["*.component.html"],
"extends": ["plugin:@angular-eslint/template/recommended", "plugin:prettier/recommended"],
"rules": {
"@angular-eslint/template/prefer-control-flow": "warn",
"prettier/prettier": ["error", { "overrides": [{ "options": { "parser": "angular" } }] }]
}
} which doesn't work "overrides": [
{
"files": "*.component.html",
"options": {
"parser": "angular"
}
}
] Can someone help ? |
The root cause is here https://github.com/prettier/prettier-vscode?tab=readme-ov-file#prettier-version-3 This is workaround: |
For anyone using a context without a package.json, you can do the following:
This gave my .ng.html templates sooooo much better syntax than before. |
Tried all that, no change. |
For me it turned out I had a reference to old version of prettier in my dev dependencies in package.json I updated it to v3.2.5 and it is working as it should. |
I've set
.prettierrc
with:as suggested in prettier/prettier#15833
But seems that it doesn't work with the VSCode extension.
As in PLAYGROUD LINK
Expected behavior:
INPUT:
OUTPUT:
But it doesn't work.
The text was updated successfully, but these errors were encountered: