-
-
Notifications
You must be signed in to change notification settings - Fork 722
Description
See #14743 for the overall effort around this. We want to make sure that auto-generated documentation is ensured by CI, so new rules cannot regress on this behavior.
Similar to rule_configuration_test.rs, a test script should be added to ensure that all rules with configuration options have a Configuration block in their rule page on the website.
We can start by enforcing this per-plugin, with all oxc/ rules that have config options now being fully documented, and hopefully soon import, jest, promise, jsdoc, and vue also being able to be added to the enforced plugins in the next few weeks. react-perf and nextjs are also fully covered at this point, I believe.
I'm not 100% sure how this should be done, ideally it'd be able to enforce that every config option in the file has corresponding documentation, but at the least we should enforce for now that all rules which define a from_configuration function also have a Configuration section in their generated website page. doc_page.rs may also be a useful reference for implementing this.
Eventually, we'll want to apply this to all rules across all plugins, but that'll require the completion of #14743 first.
Plugins we can currently enforce this check on:
oxcimport(after docs(linter): Add configuration option docs for import/extensions rule. #15171 is merged)nextjsnodereact-perfvitestjsx-a11y(after docs(linter): Add config option docs for 7 rules. #15209 is merged)