Skip to main content

acamarata_lints 1.0.0 copy "acamarata_lints: ^1.0.0" to clipboard
acamarata_lints: ^1.0.0 copied to clipboard

Shared Dart and Flutter lint rules for acamarata packages. Extends flutter_lints with strict acamarata-specific overrides for consistent code style across all packages.

acamarata_lints #

Shared Dart and Flutter lint rules for acamarata packages.

Extends flutter_lints with additional strict rules used across all acamarata Dart and Flutter packages. One include, consistent style everywhere.

Install #

Add to your pubspec.yaml:

dev_dependencies:
  acamarata_lints: ^1.0.0

Run:

dart pub get

Usage #

In your analysis_options.yaml:

include: package:acamarata_lints/analysis_options.yaml

That is the entire setup. The package resolves the flutter_lints transitive include automatically.

To add project-specific overrides beneath the include:

include: package:acamarata_lints/analysis_options.yaml

analyzer:
  exclude:
    - "**/*.g.dart"
    - "**/*.freezed.dart"

linter:
  rules:
    public_member_api_docs: false  # disable for app code if preferred

See example/analysis_options.yaml for a full annotated example.

Rule Rationale #

Rule Rationale
prefer_single_quotes Consistent string quoting across all files. Matches JS convention.
always_declare_return_types Inference alone does not communicate intent on public APIs.
avoid_print print() leaks into production logs. Use a real logger.
require_trailing_commas Trailing commas produce cleaner diffs and reduce merge conflicts.
prefer_const_constructors Const constructors reduce Flutter widget rebuilds.
avoid_dynamic_calls Dynamic calls bypass the type system and cause runtime errors.
public_member_api_docs All public APIs must be documented — these are library packages.
use_super_parameters Dart 2.17+ super-initializer syntax reduces boilerplate.
avoid_positional_boolean_parameters Boolean positional parameters are unreadable at call sites.
sort_constructors_first Consistent class structure across all files.
curly_braces_in_flow_control_structures Braces prevent off-by-one bugs when adding statements to control flow.

Strict analyzer modes #

This package enables three strict analyzer modes:

  • strict-casts — no implicit casts between types
  • strict-inference — type inference failures are reported
  • strict-raw-types — raw generic types (List without a type argument) are flagged

Requirements #

  • Dart SDK: >=3.0.0 <4.0.0
  • Depends on: flutter_lints >=3.0.0 <6.0.0

Changelog #

See CHANGELOG.md.

License #

MIT. See LICENSE.

0
likes
140
points
83
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Shared Dart and Flutter lint rules for acamarata packages. Extends flutter_lints with strict acamarata-specific overrides for consistent code style across all packages.

Repository (GitHub)
View/report issues

Topics

#lints #analysis #flutter #dart #style

License

MIT (license)

Dependencies

flutter_lints

More

Packages that depend on acamarata_lints