disallow the subclassing of the built-in classes (es/no-subclassing-builtins)

This rule reports ES2015 subclassing of built-in classes as errors.

The built-in classes include the following classes (constructors):

  • Array
  • Boolean
  • Error
  • RegExp
  • Function
  • Map
  • Number
  • Promise
  • Set
  • String

Examples

⛔ Examples of incorrect code for this rule:

/*eslint es/no-subclassing-builtins: error */ class MyArray extends Array { // ... }
Now loading...

📚 References

Last Updated: 8/27/2019, 11:29:02 AM