
When an include is not surrounded by empty lines, its content is inlined on the same line as the adjacent content. That can lead to broken tags and other display issues. This PR fixes all such includes and introduces a validation step that forbids introducing the same problem again.
74 lines
1.1 KiB
Plaintext
74 lines
1.1 KiB
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Exceptions
|
|
|
|
This rule ignores Immediately Invoked Function Expressions (IIFE), which are functions that are created and invoked without ever being assigned a name.
|
|
|
|
[source,javascript]
|
|
----
|
|
(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[]
|