house_rules: Writing Flutter project lint rules in YAML instead of custom analyzer plugins
The author argues that project conventions, such as using design tokens rather than raw colors or preventing cross-layer imports, are usually documented in wikis and go unenforced. Dart's analyzer cannot easily express such rules, and custom analyzer plugins require a separate package and ongoing maintenance. To address this, they created house_rules, a tool where each rule is defined in a few lines of YAML and ships with ten built-in rules. It includes a baseline feature so existing violations do not fail CI while only new problems do. On a 2,937-file Flutter app, the tool reportedly checks the whole project in about 0.285 seconds, and it requires Dart 3.11 or newer.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in