Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

JoshuaKGoldberg
Copy link

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.

@eslint-github-bot
Copy link

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.

  • The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
  • There should be a space following the initial tag and colon, for example 'feat: Message'.
  • The first letter of the tag should be in lowercase

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

@JoshuaKGoldberg JoshuaKGoldberg changed the title RFC: Configuring File Name from Block Meta docs: [RFC] Configuring File Name from Block Meta Dec 4, 2023
Copy link
Member

@nzakas nzakas left a 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?)

rfcs/configure-file-name-from-block-meta.md Outdated Show resolved Hide resolved
@JoshuaKGoldberg
Copy link
Author

I asked Docusaurus about the decision to use title: facebook/docusaurus#10033.

nzakas
nzakas previously approved these changes Nov 13, 2024
Copy link
Member

@nzakas nzakas left a 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

Comment on lines +21 to +22
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.
Copy link
Member

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.

Copy link
Member

@fasttime fasttime left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implementing
Development

Successfully merging this pull request may close these issues.

5 participants