Closed MrChocolatine closed 3 years ago
Hi @MrChocolatine thank you for report! This issue tracked in https://github.com/lifeart/ember-language-server/issues/142 TLDR - current template-lint implementation "caching" config file per requere. To solve it - we have to lint files in new nodejs process.
Dang, sorry I didn't look enough in the existing issues. I am glad to see this issue has been spotted :v: .
Sorry for the title a bit vague (feel free to change it) but I will try to explain better here.
I am creating a HBS helper and when I use it, I get the expected warning:
I knew that, let's allow this helper in the config file by adding the following to the file
.template-lintrc.js
:But I still get the error in my HBS file, where the helper is used, even if I close/reopen the file. However if I reload the whole window (Command Palette > Developper: Reload Window) the error disappears.
Now, to dig a little bit more, if I remove the rule
no-implicit-this
from my config file I don't get the error in my HBS file. If I type a few characters or close/reopen the HBS file, same, I still don't get any error, as if my helper was still allowed. If I reload the window, this time I don't get the error "Ambiguous path is not allowed" but if I type a few characters the errors finally shows up.Here is a short video of what I tried to explain, if that can help:
https://user-images.githubusercontent.com/47531779/105969222-ec822f80-607f-11eb-93e3-2917960acae3.mov