feat: add filtering by tag to "List of rules" page#2988
Conversation
|
@bartlomieju do you need anything more from me here or can this be merged? I don't have perms to do so |
fibibot
left a comment
There was a problem hiding this comment.
Filtering reads data-tags={lintRule.tags.join(",")} from the generated lint-rule list and combines it with the existing #lint-rule-search query, so tag buttons do not change page URLs and empty-tag rules reappear when no filter is active. lint and link check is green.
|
@bartlomieju this is ready to merge |
lunadogbot
left a comment
There was a problem hiding this comment.
The tag buttons read the same lintRule.tags data already used for rule badges, and updateVisibility() combines the active tag set with the existing #lint-rule-search predicate instead of replacing it. Rules without tags reappear when no tag filter is active, CI is green, and deno task build:light completed locally.
|
@bartlomieju this is ready to merge |
There's a long list of lint rules on https://docs.deno.com/lint/ and no way to narrow them down by type aside from searching. This was really bothering me, so here's a PR that makes the existing rule set buttons filter the list.
It works with search (AND condition):
Multiple tags can be selected (OR condition):
Styles for "pressed" buttons were lifted from the dark mode toggle button for consistent styling.