Skip to content

Conversation

lumirlumir
Copy link
Member

@lumirlumir lumirlumir commented Aug 21, 2025

Prerequisites checklist

What is the purpose of this pull request?

Hi,

In this PR, I added Prettier to the update-rules-docs script.

This change was motivated by the implementations in eslint/json and eslint/css:

image

Other plugins like JSON and CSS use Prettier when running the update-rules-docs script, but the Markdown plugin didn't.

It felt like a minor inconsistency across the plugin ecosystem, and since prettifying README.md made it clearer to me, I decided to make this change.

I also removed README.md from .prettierignore so its formatting will be checked in CI.

The changes in README.md were auto-generated by Prettier, and I reviewed them, they only affect formatting.

What changes did you make? (Give an overview)

In this PR, I added Prettier to the update-rules-docs script.

Related Issues

N/A

Is there anything you'd like reviewers to focus on?

N/A

@eslintbot eslintbot added this to Triage Aug 21, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Aug 21, 2025
@@ -2,3 +2,4 @@ dist
CHANGELOG.md
jsr.json
**/*.md
!/README.md
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looking at the JSON and CSS plugins, all of their Markdown files are formatted with Prettier.

I'd like to ask how the team would feel about formatting all Markdown files in this repo with Prettier. (If that's out of scope for this PR, I'm happy to open a separate issue.)

The Markdown repository includes code-block linting examples, so if the main concern is those examples, not adding Prettier here seems reasonable to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory it shouldn't matter as we should be able to properly lint the Markdown files even after they're formatted. I'd say try formatting them all and then linting. If there aren't any errors (or any errors that aren't easily fixable), then we can move forward with formatting all the .md files.

Copy link
Member Author

@lumirlumir lumirlumir Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking a look.

I tried it, but Prettier is more opinionated with Markdown formatting than I expected. (It changes some of the rule examples that we intentionally included.) So, I think it's fine to just format the root-level README.md file as it is now.

@lumirlumir lumirlumir marked this pull request as ready for review August 21, 2025 15:04
@lumirlumir lumirlumir requested a review from a team August 21, 2025 15:05
…add-prettier-to-update-rules-docs-script
@lumirlumir lumirlumir moved this from Needs Triage to Implementing in Triage Aug 23, 2025
@lumirlumir lumirlumir requested a review from nzakas August 23, 2025 07:34
@lumirlumir lumirlumir force-pushed the build-add-prettier-to-update-rules-docs-script branch from e69b900 to ba96590 Compare August 23, 2025 07:44
Copy link
Member

@mdjermanovic mdjermanovic 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!

@mdjermanovic mdjermanovic merged commit ec03317 into main Aug 24, 2025
23 checks passed
@mdjermanovic mdjermanovic deleted the build-add-prettier-to-update-rules-docs-script branch August 24, 2025 15:03
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

3 participants