
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.
39 lines
817 B
Plaintext
39 lines
817 B
Plaintext
== Why is this an issue?
|
|
|
|
Re-exporting is a feature that allows a file to import a component (object, function or primitive) from a module and add it to the exported components of the file's module. However, as the language allows a file to export a component without explicitly importing it, a reader may mistake a re-export with a simple export.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,javascript]
|
|
----
|
|
export { foo } from 'someModule';
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,javascript]
|
|
----
|
|
import { foo } from 'someModule';
|
|
export { foo };
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Explicitly import this/these component/s before re-exporting it/them.
|
|
|
|
|
|
=== Highlighting
|
|
|
|
The exported component
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|