Unused imported bindings should be removed

  • UNUSED_IMPORT
  • Code Quality
  • Low
  • es6

This rule applies when imported bindings are declared but not used.

For maintainability, it is recommended to remove unused code. Also, it might be a mistake that a programmer forgets to use declared imported bindings.

Noncompliant Code Example

import {
    count,
    increment // UNUSED_IMPORT alarm
} from "my-counter";
console.log(count);

Compliant Code Example

// In case when the imported binding is actually not used
import {
    count
} from "my-counter";
console.log(count);

Version

This rule was introduced in DeepScan 1.0.0-alpha.