prefer-correct-package-name
Warns when a package name does not match the config.
note
This rule requires configuration in order to highlight any issues.
⚙️ Config
Set name-pattern
(default is none) to set the expected package name pattern.
dart_code_metrics:
...
pubspec-rules:
...
- prefer-correct-package-name:
name-pattern: ^company_name*
Example
❌ Bad:
name: some_package # LINT
description: ...
version: 1.0.0
✅ Good:
name: cool_package
description: ...
version: 1.0.0