always_put_doc_comments_before_annotations

SeverityQuick FixOptions
Info

Details

DO place doc comments before metadata annotations.

see: effective-dart

Bad
@immutable
/// Some documentation.
class A {}
Good
/// Some documentation.
@immutable
class A {}

Usage

To enable the always_put_doc_comments_before_annotations rule, add always_put_doc_comments_before_annotations under custom_lint > rules in your analysis_options.yaml file:

custom_lint:
  rules:
    - always_put_doc_comments_before_annotations