-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Bug: V9 can't test non-exists file in RuleTester
#17962
Comments
RuleTester
RuleTester
The problem is that absolute paths are not supported here (unless it happens that the path is in or under the current working directory). It would work with Do you need absolute paths in your test cases? |
Shouldn't |
I think that absolute paths should be supported because rules are getting absolute paths in production so testing with absolute paths seems more realistic. Perhaps we could pass eslint/lib/rule-tester/rule-tester.js Lines 579 to 580 in 806f708
@nzakas what do you think? |
I think that makes sense. We should be able to support absolute paths in tests. 👍 |
That makes sense, I'll work on this. |
Environment
Node version: v18.18.0
npm version: v9.4.2
Local ESLint version: v9.0.0-alpha.0 (Currently used)
Global ESLint version: Not found
Operating System: linux 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
What parser are you using?
Default (Espree)
What did you do?
Create a file to run
RuleTester
What did you expect to happen?
Should pass.
What actually happened?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/stackblitz-starters-dvpau5?description=Starter%20project%20for%20Node.js,%20a%20JavaScript%20runtime%20built%20on%20Chrome%27s%20V8%20JavaScript%20engine&file=index.js,package.json&title=node.new%20Starter
Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: