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

refactor(lint): move lint rule docs to cli/tools/lint/docs/ #27293

Closed

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Dec 9, 2024

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.

Copy link
Member Author

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.

Copy link
Member

@dsherret dsherret Dec 10, 2024

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,
Copy link
Member

@dsherret dsherret Dec 10, 2024

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?

Copy link
Member Author

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.

Copy link
Member

@dsherret dsherret Dec 10, 2024

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?

pub struct LintRuleProvider {

@bartlomieju
Copy link
Member Author

Closing in favor of #27324 and another PR that will be opened in deno-docs repo.

@bartlomieju bartlomieju deleted the deno_lint_docs_internal branch December 11, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants