clean_code_lints 0.3.2 copy "clean_code_lints: ^0.3.2" to clipboard
clean_code_lints: ^0.3.2 copied to clipboard

Opinionated lint rules for clean architecture and clean code in Dart and Flutter projects.

0.3.2 #

  • Documentation fixes, no code changes:
    • Fix the install snippet in the README — it combined the scalar shorthand (clean_code_lints: ^0.1.0) with a nested diagnostics: block, which is invalid YAML. It now uses the nested form with a version: key.
    • Correct the Compatibility section: the supported Dart floor is 3.10 (matching the sdk: ">=3.10.0" constraint), not 3.9.
    • Update stale v0.1.0 version references.

0.3.1 #

  • Widen dependency constraints to analyzer: >=11.0.0 <15.0.0 and analysis_server_plugin: >=0.3.11 <0.4.0. analysis_server_plugin pins analyzer to an exact version, and each pairing requires a specific Dart SDK, so the previous ^14.1.0 / ^0.3.20 pins made the plugin unresolvable on Dart < 3.11 (including Flutter 3.38 / Dart 3.10, the documented minimum) and conflicted with every other analysis-server plugin in a shared plugins: context (peers sit on analyzer 12–13). With the wide ranges, pub selects the pairing that matches the consumer's SDK and co-resolves with other plugins. Analyzer 10.x is deliberately excluded: the plugin loads there but silently reports no diagnostics.
  • Add src/ast_compat.dart and rewrite hardcoded_spacing, single_letter_parameter, and hungarian_notation against AST APIs that are stable across the whole range, recognising the reshaped named-argument node structurally (the approach used by dart_code_linter). Rules no longer reference version-specific classes such as RegularFormalParameter or the argumentExpression getter.
  • Verified (analyze + full test suite) against analyzer 11.0.0, 12.1.0, 13.0.0, and 14.1.0.

0.3.0 #

  • Upgrade analyzer to ^14.1.0. The ^14.0.0 constraint conflict noted in 0.2.0 has been resolved upstream, so the package now runs on analyzer 14.x.
  • Upgrade analysis_server_plugin to ^0.3.20.
  • Bump the test dev dependency to ^1.31.0.

0.2.0 #

  • Upgrade analyzer to ^13.3.0 (latest resolvable; ^14.0.0 blocked by an upstream constraint conflict between analysis_server_plugin 0.3.19 and analyzer_plugin via dart_style).
  • Upgrade analysis_server_plugin to ^0.3.18.
  • Upgrade lints to ^6.1.0.

0.1.0 #

  • Initial release. 19 lint rules, grouped by family:
    • Size & shape: file_too_long, function_too_long, class_too_long, build_method_too_long, too_many_function_arguments.
    • Naming: single_letter_parameter, hungarian_notation.
    • Layered architecture: domain_layer_imports, presentation_imports_storage, feature_isolation.
    • Widget hygiene: widget_level_try_catch, widget_build_method.
    • Hardcoded literals: hardcoded_color, hardcoded_spacing, hardcoded_endpoint.
    • Clean code: no_print_in_production, avoid_dynamic, missing_await, enum_exhaustive_switch.
1
likes
160
points
269
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Opinionated lint rules for clean architecture and clean code in Dart and Flutter projects.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

analysis_server_plugin, analyzer

More

Packages that depend on clean_code_lints