-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat(rules): validate the option examples for rules #1442
feat(rules): validate the option examples for rules #1442
Conversation
✅ Deploy Preview for biomejs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Note: This PR has merge conflicts because it needs to update
|
8091cf9
to
92aefd2
Compare
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.
You should run pnpm codegen:rules
to check end result, and commit those files
1cdd653
to
476e167
Compare
Done 👍 Though the changes actually caused by this commit will only show up after biomejs/biome#4542 has been merged, because no |
I re-ran |
Just as a heads-up, there are problems in the output that are related to/caused by #1440. They are not caused by the changes in this PR, but this PR manages to trigger some edge cases not hit before. See for example https://deploy-preview-1442--biomejs.netlify.app/linter/rules/use-sorted-classes/#code-related: |
Yeah that's an issue of MDX and the use of JS templates inside the source code. I still have no idea how to fix it properly, but for now we need to live it with it |
Summary
Extend the
rules_check
to:(1) Ensure that configuration fragments are actually valid (and do not contain syntax or schema errors):
(2) Validate rule examples that use a non-default configuration:
(3) Allow hiding lines from the output like
rustdoc
does by prefixing them with#
.The corrresponding PR for
biomejs/website
is biomejs/biome#4542.Test Plan
pnpm codegen:rules