banned-dependencies
added in: 1.2.0
warning
Warns when a pubspec contains a banned dependency.
⚙️ Config
Set banned
(default is none) to configure the list of banned packages.
Set allowed
(default is none) to configure the list of allowed packages.
dart_code_metrics:
...
pubspec-rules:
...
- banned-dependencies:
banned:
- get
- some_deprecated_package
note
This rule requires configuration in order to highlight any issues.
Example
❌ Bad:
name: some_package
description: ...
version: 1.0.0
dependencies:
some_deprecated_package: 1.0.0 # LINT
✅ Good:
name: some_package
description: ...
version: 1.0.0