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

50 lines
1019 B
Plaintext

== Why is this an issue?
While named function expressions might be useful for debugging purposes, some browsers do not support them correctly (for example Internet Explorer 8).
=== Noncompliant code example
[source,javascript]
----
f = function fun(){}; // Noncompliant; named function expression
----
=== Compliant solution
[source,javascript]
----
fun = function(){}; // Compliant; function expression
----
=== Exceptions
ECMAScript 6 generator functions are excluded from this rule.
[source,javascript]
----
function* f() {} // Compliant; generator function.
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
=== on 1 Nov 2019, 16:26:41 Elena Vilchik wrote:
See \https://github.com/SonarSource/SonarJS/issues/1698
=== on 19 Oct 2020, 10:48:06 Guillaume Dequenne wrote:
Dropping this rule as it has low value. See:
https://github.com/SonarSource/SonarJS/issues/2208
https://github.com/SonarSource/SonarJS/issues/1698
endif::env-github,rspecator-view[]