json_serializable_lints 0.1.1 copy "json_serializable_lints: ^0.1.1" to clipboard
json_serializable_lints: ^0.1.1 copied to clipboard

Dart custom lint rules for json_serializable package.

json_serializable_lints #

Small analysis server plugin with focused lints for json_serializable models.

Rules #

  • require_json_serializable_from_json
    Requires factory ClassName.fromJson(Map<String, dynamic> json) on @JsonSerializable() classes.
  • require_json_serializable_to_json
    Requires Map<String, dynamic> toJson() on @JsonSerializable() classes.

These rules are skipped when you explicitly disable generation with createFactory: false or createToJson: false.

Usage #

Add the package to your Dart or Flutter project:

# analysis_options.yaml
plugins:
  json_serializable_lints: any

Run analysis:

dart analyze

See examples for detailed options.

More info #

Contributing #

Contributions, issues, and pull requests are welcome.

1
likes
0
points
181
downloads

Publisher

verified publisherleithmail.org

Weekly Downloads

Dart custom lint rules for json_serializable package.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analysis_server_plugin, analyzer

More

Packages that depend on json_serializable_lints