2023-05-03 11:06:20 +02:00
== Why is this an issue?
2021-01-08 16:20:41 +01:00
include::../description.adoc[]
2023-05-03 11:06:20 +02:00
=== Exceptions
2021-01-08 16:20:41 +01:00
2022-04-11 15:27:40 +02: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
2022-08-04 15:12:16 +02: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() {
// ...
}
})();
----
2021-06-02 20:44:38 +02:00
2022-04-11 15:27:40 +02:00
This rule also ignores React Functional Components, which are JavaScript functions named with a capital letter and returning a React element (JSX syntax).
2022-08-04 15:12:16 +02:00
[source,javascript]
2022-04-11 15:27:40 +02:00
----
function Welcome() {
const greeting = 'Hello, World!';
// ...
return (
<div className="Welcome">
<p>{greeting}</p>
</div>
);
}
----
2021-06-03 09:05:38 +02:00
ifdef::env-github,rspecator-view[]
2021-09-20 15:38:42 +02:00
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
2023-05-25 14:18:12 +02:00
=== Parameters
.max
****
_INTEGER_
----
200
----
Maximum authorized lines of code in a function
****
2021-09-20 15:38:42 +02:00
2021-06-08 15:52:13 +02:00
'''
2021-06-02 20:44:38 +02:00
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
2023-06-22 10:38:01 +02:00
2021-06-03 09:05:38 +02:00
endif::env-github,rspecator-view[]