dart_easy_json_lints 0.3.0
dart_easy_json_lints: ^0.3.0 copied to clipboard
Analyzer plugin for dart_easy_json: flags misused annotations in the editor, before build_runner runs.
0.3.0 #
- New assist Convert to @EasyJson model, on the name of a plain class: adds the imports (the package and the
.easy.dartfile),@EasyJson(),with XSerializer, a constructor with named parameters (only when the class has none) and thefromJsonfactory. Generic, abstract and sealed classes aren't offered it.
0.2.0 #
- New rule
easy_json_missing_mixin: an@EasyJsonclass withoutwith XSerializer(it has notoJson(), so models containing it don't compile). Quick fix: add the mixin, with the class's type parameters. - New rule
easy_union_missing_factory: an@EasyUnionmapped class withoutfactory X.fromJson, which the generated union code calls. Quick fix: add the factory. - New rule
easy_union_mapping_not_subtype: an@EasyUnionmapping to a class that doesn't extend or implement the union. - Quick fix for
easy_validate_wrong_type: remove the rule (or the whole annotation when it's the only one). The warning is now reported on the offending argument (minLength: 3) instead of the whole annotation.
0.1.0 #
- Initial release, for Dart 3.10+ analyzer plugins.
easy_validate_wrong_type: flags@EasyValidaterules used on a field type they don't apply to (they were silently ignored by the generator).easy_convert_wrong_signature: flags@EasyConvert(fromJson,toJson,valueFromJson,valueToJson) and@EasyValidate(custom:)functions whose signature doesn't fit the annotated field.