Files
oxc-project__oxc/tasks/website_linter/src/main.rs
Sysix d58f5948ca docs(oxlint/lsp): auto generate docs for LSP options (#22082)
> ## Pull request overview

> This PR adds automated generation of website documentation for oxlint’s LSP linting options by exposing the LSP options schema, rendering it to markdown, and snapshot-testing the output.

An PR on `oxc-project/website` is needed. Will wait for the next release to improve the LSP & Editor docs too :)
2026-05-02 20:00:17 +00:00

23 lines
624 B
Rust

#![expect(clippy::print_stderr)]
use pico_args::Arguments;
mod cli;
mod json_schema;
mod rules;
fn main() {
let mut args = Arguments::from_env();
let command = args.subcommand().expect("subcommands");
let task = command.as_deref().unwrap_or("default");
match task {
"schema-json" => json_schema::print_schema_json(),
"schema-markdown" => json_schema::print_schema_markdown(),
"schema-markdown-lsp" => json_schema::print_schema_markdown_lsp(),
"cli" => cli::print_cli(),
"rules" => rules::print_rules(args),
_ => eprintln!("Missing task command."),
}
}