
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.
52 lines
929 B
Plaintext
52 lines
929 B
Plaintext
== Why is this an issue?
|
|
|
|
Sharing some naming conventions is a key point to make it possible for a team to efficiently collaborate. This rule checks that all variable, property and parameter names match a provided regular expression.
|
|
|
|
=== Noncompliant code example
|
|
|
|
With the default regular expression ``++^[_$A-Za-z][$A-Za-z0-9]*$|^[_$A-Z][_$A-Z0-9]+$++``:
|
|
|
|
[source,javascript]
|
|
----
|
|
const foo_bar = 1;
|
|
const baz_ = 2;
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,javascript]
|
|
----
|
|
const fooBar = 1;
|
|
const _baz = 2;
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
=== Parameters
|
|
|
|
.format
|
|
****
|
|
_STRING_
|
|
|
|
----
|
|
\^[_$A-Za-z][$A-Za-z0-9]*$|^[_$A-Z][_$A-Z0-9]+$
|
|
----
|
|
|
|
Regular expression used to check the names against.
|
|
****
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|