
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
50 lines
881 B
Plaintext
50 lines
881 B
Plaintext
== Why is this an issue?
|
|
|
|
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)
|
|
|
|
=== Message
|
|
|
|
* Remove this unused import of {}.
|
|
|
|
|
|
=== Highlighting
|
|
|
|
Primary: Import to remove/merge
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== on 28 Jan 2019, 11:51:08 Nicolas Harraudeau wrote:
|
|
Message updated to match the implementation. This is part of the title cleaning for this rule.
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|