Closed nlfurniss closed 1 year ago
Sounds like you might be running Prettier as a linter rule via ESLint and eslint-plugin-ember. If so, this sounds like https://github.com/ember-cli/eslint-plugin-ember/issues/1659
Oh so is the issue that the error w/using eslint-plugin-prettier w/this plugin throws an error thats silently causing the red squiggles to not show?
I can do Format Document
in VSCode just fine (with and without the eslint prettier plugin)
Oh so is the issue that the error w/using eslint-plugin-prettier w/this plugin throws an error thats silently causing the red squiggles to not show?
Most likely this, yes. What happens when you try to run eslint
? I would expect one of the issues mentioned in https://github.com/ember-cli/eslint-plugin-ember/issues/1659
I think Format Document
uses straight prettier.format()
, which works fine.
Oh so is the issue that the error w/using eslint-plugin-prettier w/this plugin throws an error thats silently causing the red squiggles to not show?
Most likely this, yes. What happens when you try to run
eslint
? I would expect one of the issues mentioned in ember-cli/eslint-plugin-ember#1659I think
Format Document
uses straightprettier.format()
, which works fine.
Oddly no...
nfurniss: bs-proj (master) $ node_modules/eslint/bin/eslint.js app/components/test.gjs
/Users/nfurniss/code/bs-proj/app/components/test.gjs
1:7 error 'q' is assigned a value but never used no-unused-vars
1:1 error Replace `⏎` with `·` prettier/prettier
0:0 error Replace `__GLIMMER_TEMPLATE(`<Foo·/>"lol"`,·{·strictMode:·true,·scope:·()·=>·({Foo})·})]` with `⏎··__GLIMMER_TEMPLATE(`<Foo·/>"lol"`,·{⏎····strictMode:·true,⏎····scope:·()·=>·({·Foo·}),⏎··}),⏎]⏎` prettier/prettier
4:12 error 'Foo' is not defined no-undef
Note that the line:column
for the prettier/prettier
error when run via eslint
is 0:0
which is incorrect. As a result, VSCode doesn't know where to put the squiggly lines. Fixing https://github.com/ember-cli/eslint-plugin-ember/issues/1659 should resolve this issue as well.
Going to close this since it's roughly the same issue with the same solution as https://github.com/gitKrystan/prettier-plugin-ember-template-tag/issues/20
🐞 Describe the Bug
VSCode is not showing Prettier errors in
gjs
files, but does injs
filesHowever, the prettier plugin is working, as it can be successfully invoked from the commandline:
🔬 Minimal Reproduction
Repro repo: https://github.com/nlfurniss/bs-proj/commit/61a82ea408820c3ddf4d058a282c2287c914c317
😕 Actual Behavior
No red squiggles in VSCode
🤔 Expected Behavior
Red squiggles in VSCode
🌍 Environment
➕ Additional Context
Installed VSCode plugins: