mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
d58f5948ca
> ## 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 :)
23 lines
624 B
Rust
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."),
|
|
}
|
|
}
|