sort_pub_dependencies
按字母顺序排序 pub 依赖项。
详情
#应在 pubspec.yaml 中按字母顺序(A 到 Z)排序 pub 依赖项列表。
对 pub 依赖项列表进行排序可以更轻松地进行维护。
启用
#要启用 sort_pub_dependencies 规则,请在您的 analysis_options.yaml 文件中 linter > rules 下添加 sort_pub_dependencies。
analysis_options.yaml
yaml
linter:
rules:
- sort_pub_dependencies如果您使用 YAML 映射语法来配置 linter 规则,请在 linter > rules 下添加 sort_pub_dependencies: true。
analysis_options.yaml
yaml
linter:
rules:
sort_pub_dependencies: true