-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
refactor(lint): move lint rule docs to cli/tools/lint/docs/ #27293
Conversation
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.
This is not yet automated and tested, waiting on #27162 to land so appropriate APIs are available.
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.
I don't think we should store these docs here. They're docs are for lint rules that live in deno_lint, so they should either live there or we should move all these docs to the deno-docs repo. Edit: It probably makes most sense to move these to deno-docs because these are for deno-docs.
@@ -302,6 +302,7 @@ pub struct LintFlags { | |||
pub json: bool, | |||
pub compact: bool, | |||
pub watch: Option<WatchFlags>, | |||
pub internal_print_all_rules: bool, |
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.
I don't think we need this? We can add a unit test that does this linting in tools/lint?
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.
Not until #27245 lands, there's no way to get all available rules right now and print them.
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.
I think we can use LintRuleProvider
and instead write a unit test?
deno/cli/tools/lint/rules/mod.rs
Line 146 in d99b2d6
pub struct LintRuleProvider { |
Closing in favor of #27324 and another PR that will be opened in |
Also adds an internal (hidden) flag to get a list of all rules,
and adds tests to ensure that all lint rules have docs as
well as the schema files are up to date.