Description
Please add library_annotations
to the recommended or core set of lints.
It is currently possible to associate metadata with a library as such by putting it in front of all non-comment/non-whitespace elements in a library. However, this is ambiguous: The metadata might be intended for the library as such, but it might just as well be intended for the first import directive, or whatever comes first after the metadata. Some kinds of metadata could be applicable to both, and it could matter.
If we actively support the habit of putting library metadata on a <libraryName>
directive (a plain library;
would suffice) then there will be fewer and fewer cases where this ambiguity exists, and we may be able to retire this feature entirely (which means that there must be a <libraryName>
for metadata on the library, and the metadata that occurs at the top of the library without a <libraryName>
will unambiguously be associated with whatever comes next).
Note that dangling_library_doc_comments
is already in core, recommended, and flutter. Both lints have a quick fix.
Metadata
Metadata
Assignees
Type
Projects
Status