package_names
Use lowercase_with_underscores
for package names.
This rule is available as of Dart 2.0.
Rule sets: recommended, flutter
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.
Usage
#To enable the package_names
rule,
add package_names
under linter > rules in your
analysis_options.yaml
file:
analysis_options.yaml
yaml
linter:
rules:
- package_names
除非另有说明,文档之所提及适用于 Dart 3.5.3 版本,本页面最后更新时间: 2024-08-02。 查看文档源码 或者 报告页面问题。