You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@prettier/plugin-oxc won't work with embeded angular through eslint-prettier-plugin #754
Then we use oxc-ts to parse the template, which is a virtual file prettier-angular-oxc-eslint/src/app/nx-welcome.ts/1_inline-template-nx-welcome.ts-1.component.html.
Activity
fisker commentedon Aug 3, 2025
I'm sorry, I can't reproduce this.
Log
Can you post more details or share a reproduction step?
kbrilla commentedon Aug 5, 2025
Sure thing! I created reproduction repo:
https://github.com/kbrilla/prettier-angular-oxc-eslint
For me it looks like when using
@prettier/plugin-oxcinline html is parsed withhtmlparser and notangularparser.fisker commentedon Aug 5, 2025
I guess it's an
eslint-plugin-prettierissue, transfered.Thanks for the reproduction, we'll take a look.
fisker commentedon Aug 5, 2025
In this case, we are using
onDiskFilepathto get the parsereslint-plugin-prettier/worker.mjs
Lines 42 to 51 in cdfcefd
.tsfile, we get theoxc-tsparser.Then we use
oxc-tsto parse the template, which is a virtual fileprettier-angular-oxc-eslint/src/app/nx-welcome.ts/1_inline-template-nx-welcome.ts-1.component.html.This is where the error comes from.
@JounQin Do you have an idea how to fix it?
I don't think we should take https://github.com/kbrilla/prettier-angular-oxc-eslint/blob/9012b2938a2c7f037341806c808c047607a922c5/.prettierrc#L5-L10 into count. It should only apply to "real" files.
Should we ignore virtual files?
JounQin commentedon Aug 5, 2025
eslint-plugin-prettier/worker.mjs
Lines 148 to 172 in cdfcefd
Virtual files are already ignored.
But in the new case, it's
oxc-tsI think?kbrilla commentedon Aug 5, 2025
Just to make sure, it all does work without
@prettier/plugin-oxcin current configuration.JounQin commentedon Aug 5, 2025
We'll need to add oxc related new parsers into
parserBlocklist, feel free to raise a PR for them. Similar forhermesplugin.