package_ names
Use lowercase_with_underscores
for package names.
Details
#From the Pubspec format description:
DO use lowercase_with_underscores
for package names.
Package names should be all lowercase, with underscores to separate words,
just_like_this
. Use only basic Latin letters and Arabic digits: [a-z0-9_].
Also, make sure the name is a valid Dart identifier -- that it doesn't start
with digits and isn't a reserved word.
Enable
#
To enable the
package_names
rule, add
package_names
under
linter > rules
in your
analysis_options.yaml
file:
linter:
rules:
- package_names
If you're instead using the YAML map syntax to configure linter rules,
add
package_names: true
under
linter > rules:
linter:
rules:
package_names: true
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Report an issue.