74 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

== Why is this an issue?
2021-01-08 16:20:41 +01:00
include::../description.adoc[]
=== Exceptions
2021-01-08 16:20:41 +01:00
This rule ignores Immediately Invoked Function Expressions (IIFE), which are functions that are created and invoked without ever being assigned a name.
2021-01-08 16:20:41 +01:00
[source,javascript]
2021-01-08 16:20:41 +01:00
----
(function () { // Ignored by this rule
function open() { // Classic function declaration; not ignored
// ...
}
function read() {
// ...
}
function readlines() {
// ...
}
})();
----
This rule also ignores React Functional Components, which are JavaScript functions named with a capital letter and returning a React element (JSX syntax).
[source,javascript]
----
function Welcome() {
const greeting = 'Hello, World!';
// ...
return (
<div className="Welcome">
<p>{greeting}</p>
</div>
);
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
=== Parameters
.max
****
_INTEGER_
----
200
----
Maximum authorized lines of code in a function
****
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]