Rule: class-name

Enforces PascalCased class and interface names.

Rationale

Makes it easy to differentiate classes from regular variables at a glance.

JavaScript and general programming convention is to refer to classes in PascalCase. It’s confusing to use camelCase or other conventions for class names.

Config

Not configurable.

Config examples
"class-name": true
Schema
null

Code examples:

Enforces PascalCased class and interface names.
"rules": { "class-name": true }
Passes
class MyClass { }
interface MyInterface { }
Fails
class myClass { }
interface myInterface { }