19 lines
329 B
Plaintext
19 lines
329 B
Plaintext
![]() |
There's no reason to import modules you don't use; and every reason not to: doing so needlessly increases the load.
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
import A from 'a'; // Noncompliant, A isn't used
|
||
|
import { B1 } from 'b';
|
||
|
|
||
|
console.log(B1);
|
||
|
----
|
||
|
|
||
|
== Compliant Solution
|
||
|
|
||
|
----
|
||
|
import { B1 } from 'b';
|
||
|
|
||
|
console.log(B1);
|
||
|
----
|