Add `physicalFilename` option into rule tester
See original GitHub issue@snitin315 @nzakas @mdjermanovic
I find physicalFilename
is not available in ValidTestCase
, so it makes testing cases for virtual filename unavailable, should that be supported?
Before context.getPhysicalFilename
, I have a custom util getPhysicalFilename
and a test case like:
ruleTester.run('remark', remark, {
valid: [
{
code: '<header>Header2</header>',
parser,
parserOptions,
filename: path.resolve(__filename, '0-fake.mdx'), // virtual filename
},
],
})
But when I migrate to context.getPhysicalFilename
, it results context.getPhysicalFilename() === filename
, it is not correct, so maybe a new physicalFilename
option is required for this case:
ruleTester.run('remark', remark, {
valid: [
{
code: '<header>Header2</header>',
parser,
parserOptions,
physicalFilename: __filename,
filename: path.resolve(__filename, '0-fake.mdx'), // virtual filename
},
],
})
_Originally posted by @JounQin in https://github.com/eslint/eslint/issues/14616#issuecomment-878712207_
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Renaming Logical and Physical file names in SQL Server on ...
In this blog post we will explain you the easiest way for renaming Logical and Physical file names in SQL Server on Linux....
Read more >logical file name - SAP Community
To create a physical file name from a logical file name in your ABAP programs, use the function module FILE_GET_NAME. To insert the...
Read more >Module mod_rewrite - IBM
Use this when you want to add more data to the query string via a rewrite rule. passthrough|PT: This flag forces the rewriting...
Read more >Statements : FILE - SAS OnlineDoc, V8
It must conform to the same rules as a fileref. ... the LRECL= option in the FILE statement when you write to a...
Read more >DBCC TRACEON - Trace Flags (Transact-SQL)
Note: Ensure that you thoroughly test this option, before rolling it ... to optimize insert performance for records inserted into new pages.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.