ECMAScript 6 allows programmers to create class
to "help" those coming from a OOP language, such as Java or C++, to create constructors, thus multiple instances of an object.
In the JS community this is considered one of the bad parts.
This rule aims to discourage the use of class
and to encourage other approaches such as functional inheritance,
prototypal inheritance or object composition.
The following patterns are considered warnings:
class Foo {
constructor() {
this.foo = 'bar';
}
}
Existing ES6 JavaScript projects that are heavily using classical inheritance may not want to apply this rule if the cost of removing class
is too costly.