2021-01-27 13:42:22 +01:00

26 lines
520 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.