33 lines
658 B
Plaintext
Raw Normal View History

2020-06-30 12:48:39 +02:00
By convention, a file that exports only one class, function, or constant should be named for that class, function or constant. Anything else may confuse maintainers.
== Noncompliant Code Example
----
// file path: myclass.js -- Noncompliant
class MyClass {
// ...
}
export default MyClass;
----
== Compliant Solution
----
// file path: MyClass.js
class MyClass {
// ...
}
export default MyClass;
----
== Exceptions
2021-01-27 13:42:22 +01:00
Case, underscores ( ``++_++`` ) and dashes (``++-++``) are ignored from the name comparison.
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::rspecator-view[]