biome-plugin-angular
v1.0.0
Published
Biome 2.x plugin for Angular — GritQL port of @angular-eslint rules
Downloads
122
Maintainers
Readme
biome-plugin-angular
Biome 2.x plugin that ports the most important
@angular-eslintrules to GritQL. Drop-in replacement for teams migrating from ESLint to Biome on Angular 17–21 projects.
Features
- GritQL rules fully compatible with Biome 2.x plugin system
- Covers the most-used
@angular-eslintrules (17 rules planned) - CLI helper:
biome-angular init|merge|remove|rules recommendedandstrictpresets- Zero runtime dependencies
Requirements
| Tool | Version |
| ----------------- | --------- |
| Node.js | >= 18 |
| @biomejs/biome | >= 2.0.0 |
| Angular | >= 17 |
Installation
npm install --save-dev biome-plugin-angular @biomejs/biomeGetting Started
Option A — CLI (recommended)
# Create a biome.json from scratch
npx biome-angular init
# Or add the plugin to your existing biome.json
npx biome-angular mergeOption B — Manual configuration
Add the plugin to your biome.json:
{
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
"plugins": ["biome-plugin-angular"],
"linter": {
"enabled": true,
"rules": {
"plugins": {
"angular/prefer-standalone": "error",
"angular/no-empty-lifecycle-method": "warn",
"angular/component-class-suffix": "error"
}
}
}
}Option C — Extend a preset
{
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
"extends": ["biome-plugin-angular/presets/recommended"]
}Rules
High Priority
| Rule | ESLint equivalent | Recommended | Auto-fix |
| ---- | ----------------- | :---------: | :------: |
| angular/prefer-standalone | @angular-eslint/prefer-standalone | error | — |
| angular/no-empty-lifecycle-method | @angular-eslint/no-empty-lifecycle-method | warn | — |
Conventions
| Rule | ESLint equivalent | Recommended | Auto-fix |
| ---- | ----------------- | :---------: | :------: |
| angular/no-component-suffix | (new — Angular v20+) | warn | — |
| angular/component-selector | @angular-eslint/component-selector | warn | — |
| angular/no-input-rename | @angular-eslint/no-input-rename | error | — |
| angular/no-output-rename | @angular-eslint/no-output-rename | error | — |
| angular/no-output-on-prefix | @angular-eslint/no-output-on-prefix | error | — |
| angular/pipe-prefix | @angular-eslint/pipe-prefix | warn | — |
| angular/sort-ngmodule-metadata-arrays | @angular-eslint/sort-ngmodule-metadata-arrays | warn | — |
Conventions (coming soon)
| Rule | ESLint equivalent | Status |
| ---- | ----------------- | ------ |
| angular/directive-selector | @angular-eslint/directive-selector | planned |
Quality (coming soon)
| Rule | ESLint equivalent | Status |
| ---- | ----------------- | ------ |
| angular/use-lifecycle-interface | @angular-eslint/use-lifecycle-interface | planned |
| angular/no-host-metadata-property | @angular-eslint/no-host-metadata-property | planned |
| angular/use-pipe-transform-interface | @angular-eslint/use-pipe-transform-interface | planned |
| angular/contextual-lifecycle | @angular-eslint/contextual-lifecycle | planned |
| angular/no-inputs-metadata-property | @angular-eslint/no-inputs-metadata-property | planned |
| angular/no-outputs-metadata-property | @angular-eslint/no-outputs-metadata-property | planned |
CLI Reference
biome-angular init [--strict] [--force]
Create a new biome.json preconfigured with this plugin.
--strict Use the strict preset (all rules as errors)
--force Overwrite existing biome.json
biome-angular merge [--strict]
Add this plugin to your existing biome.json without overwriting.
biome-angular remove
Remove all biome-plugin-angular rules and plugin reference from biome.json.
biome-angular rules
Print all available rules and their implementation status.Presets
Two presets are available:
| Preset | Description |
| ------ | ----------- |
| recommended | All high-priority rules; no-empty-lifecycle-method as warn |
| strict | All high-priority rules as errors |
Reference them in biome.json:
{ "extends": ["biome-plugin-angular/presets/strict"] }Migration from @angular-eslint
If you are migrating from ESLint + @angular-eslint, you can remove the following packages
once the corresponding rules are available in this plugin:
npm uninstall eslint @angular-eslint/eslint-plugin @angular-eslint/template-parserSee rules-to-migrate.json for the full migration tracking list.
Contributing
See CONTRIBUTING.md.
