-
Notifications
You must be signed in to change notification settings - Fork 63
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
docs: [RFC] Configuring File Name from Block Meta #230
base: main
Are you sure you want to change the base?
docs: [RFC] Configuring File Name from Block Meta #230
Conversation
Hi @JoshuaKGoldberg!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together, and sorry for the delay (as I mentioned, v9 swallowed a lot of time).
This looks like a rational proposal to me. Only outstanding question I have is about title
vs. filename
(see inline). I suppose another option would be to support both? (and if both are present, just take the first one?)
I asked Docusaurus about the decision to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, completely lost track of this. I think this looks good now, but would like another 👍 from @eslint/eslint-tsc
This RFC proposes that codeblocks be allowed to specify a file path in `meta` (the \`\`\` opening fence) with `filename="..."`. | ||
Doing so would replace the `filename` provided by `eslint-plugin-markdown`'s `preprocess` method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few edge cases that will need to be considered. For example, what will happen when a path includes invalid or reserved characters, or when the name of an existing file is used (e.g. filename: "../../package.json"
), or how to indicate paths that include both '
and "
, etc. But I think it is fine to discuss those details in the implementation PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Leaving open for @mdjermanovic to review.
Per #226 (comment), this is a mini-RFC based on roughly half of the design format from https://github.com/eslint/rfcs. Sending as a PR so we can make comment threads per-line and see a commit history.