2020-06-30 12:47:33 +02:00
|
|
|
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);
|
|
|
|
----
|
2021-06-02 20:44:38 +02:00
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
ifdef::env-github,rspecator-view[]
|
2021-06-02 20:44:38 +02:00
|
|
|
== Comments And Links
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::comments-and-links.adoc[]
|
2021-06-03 09:05:38 +02:00
|
|
|
endif::env-github,rspecator-view[]
|