Repository navigation
New: add getPhysicalFilename() method to rule context (fixes #11989) - #14616
Merged
Merged
Conversation
snitin315
marked this pull request as ready for review
May 24, 2021 04:08
nzakas
requested changes
May 25, 2021
nzakas
left a comment
Member
There was a problem hiding this comment.
Overall looks good. Just one question.
btmills
reviewed
May 28, 2021
nzakas
reviewed
May 29, 2021
mdjermanovic
requested changes
May 30, 2021
mdjermanovic
reviewed
Jun 3, 2021
getPhysicalFilename() method to the rule context objectgetPhysicalFilename() method to rule context (fixes #11989)
mdjermanovic
reviewed
Jun 3, 2021
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Member
|
Thanks for contributing! |
8 of 17 tasks
Contributor
|
@snitin315 @nzakas @mdjermanovic I find Before 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 ruleTester.run('remark', remark, {
valid: [
{
code: '<header>Header2</header>',
parser,
parserOptions,
physicalFilename: __filename,
filename: path.resolve(__filename, '0-fake.mdx'), // virtual filename
},
],
}) |
Member
|
@JounQin I'd guess we'll want to do that. Can you open an issue? People aren't as likely to see things that are part of finished discussions. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[X] Other, please explain:
What changes did you make? (Give an overview)
Fix #11989
add a new
getPhysicalFilename()method to the rule context object. This method will return the full path of the file on disk without any code block information.Is there anything you'd like reviewers to focus on?
No