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
Add physicalFilename
option into rule tester
#14800
Comments
That seems reasonable to me. @eslint/eslint-tsc thoughts? |
RuleTester uses Linter API. I think it would make more sense to support processors in RuleTester (eslint/rfcs#31), than adding an option that would force Linter to change its internal logic and return some other value from |
@mdjermanovic nice catch! That makes sense to me. I completely forgot about the RFC. |
TSC Summary: This issue requests to add a physicalFilename option to RuleTester to help with testing code blocks. There is already an RFC for enabling processors in RuleTester (eslint/rfcs#31) that may be more appropriate. ** TSC Question:** How do we want to proceed here? |
In the most recent TSC meeting, we agreed to go with the approach described in RFC31. I'll be picking up that RFC to update it as necessary and get it through approval. |
Oops! It looks like we lost track of this issue. @eslint/eslint-tsc what do we want to do here? This issue will auto-close in 7 days without an update. |
@btmills where are we on this? |
It sounded like mysticatea had a couple changes planned for the existing RFC, so I left a comment inquiring what those might be before I make any changes of my own, but I haven't heard back. I'll go ahead and update it for review by the team. |
RFC31 has been updated. Give it a look and please share any feedback! |
@snitin315 @nzakas @mdjermanovic
I find
physicalFilename
is not available inValidTestCase
, so it makes testing cases for virtual filename unavailable, should that be supported?Before
context.getPhysicalFilename
, I have a custom utilgetPhysicalFilename
and a test case like:But when I migrate to
context.getPhysicalFilename
, it resultscontext.getPhysicalFilename() === filename
, it is not correct, so maybe a newphysicalFilename
option is required for this case:Originally posted by @JounQin in #14616 (comment)
The text was updated successfully, but these errors were encountered: