CodeVetter · Repo Unpack · Extension points
biomejs/biome
New behavior is expected to plug in through language crates, declare_lint_rule and declare_assist macros, the analyzer registry, file handlers, configuration partials, CLI command enums, and Grit plugins. Codegen must be re-run when names or grammar change. The JS API is a consumer of the workspace, not the place to add languages.
- Lint rules are added with declare_lint_rule! in the language analyze crate, then listed in the group module (a11y, style, nursery, and so on) so the registry macro exports them.
- Assists use declare_assist_rule! and a parallel registry. Renaming a rule or assist requires just gen-rules and just gen-configuration.
- New syntax starts in an .ungram grammar, then just gen-grammar <lang> and just gen-formatter. Parser rules and formatter IR must be updated together.
- A new language frontend needs a parser crate, a formatter, an analyzer, a file handler arm in biome_service, and a DocumentFileSource variant. Registration is centralized, not discovered by directory scan.
- Rule options flow from JSON configuration through generated partial structs in biome_configuration into the rule's options type. New options require the configuration macros and schema codegen.
- ESLint option migration is an extension table: each supported rule has a source-option model and a converter. Unsupported rules are reported rather than guessed.
- Diagnostics are an extension surface. Categories, severity, markup, and advices are built with biome_diagnostics and biome_console, not ad-hoc strings.
- npm distribution adds a platform package under packages/@biomejs rather than changing the Rust entry. WASM exports are generated with wasm-bindgen.