Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
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.
2023-05-25 14:18:12 +02:00

42 lines
734 B
Plaintext

== Why is this an issue?
ECMAScript 2015 added the ability to use template literals instead of concatenation. Since their use is clearer and more concise, they are preferred in environments that support ECMAScript 2015.
=== Noncompliant code example
[source,javascript]
----
function sayHello(name) {
console.log("hello " + name); // Noncompliant
}
----
=== Compliant solution
[source,javascript]
----
function sayHello(name) {
console.log(`hello ${name}`);
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Convert this concatenation to the use of a template.
=== Highlighting
Entire concatenation expression
endif::env-github,rspecator-view[]