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
Why context.filename is undefined? What is inline lint and is it possible to add test that reproduce a problem, to ensure we will no more have regression for this bug in future after your fix?
@david-vaclavek to make changes in code we have to understand the root cause.
Could you explain why context.filename is undefined for your use case?
I can't found information for such ESLint behavior, so it looks the problem related to IDE, not to ESLint plugin. If we can prove otherwise, we should reproduce this problem in tests first and then fix it. This is how we make changes on this project.
It's likely related to the ESLint version, as we still use v7 in this project.
And although I can't find the v7 documentation anymore, context.getFilename() is listed deprecated method in v8's Custom Rules.
Therefore, I suspect this was v7's way of getting the filename.
Hello.
The
context.filename
is undefined for inline lint in Cursor IDE. I suppose it's related to the inline file lint in general.My suggested fix is to replace
with
which works perfectly in my case.
The text was updated successfully, but these errors were encountered: