38 lines
651 B
Plaintext
38 lines
651 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
|
|
|
|
[source,javascript]
|
|
----
|
|
import A from 'a'; // Noncompliant, A isn't used
|
|
import { B1 } from 'b';
|
|
|
|
console.log(B1);
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,javascript]
|
|
----
|
|
import { B1 } from 'b';
|
|
|
|
console.log(B1);
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
include::highlighting.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|