34 lines
684 B
Plaintext

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
Case, underscores ( ``++_++`` ) and dashes (``++-++``) are ignored from the name comparison.
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]