google / google/closure-compiler
Raise a warning when an ES6 class method doesn't call super
Open
enhancement
ES6
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
When an ES6 class extends another and overrides a method, it's pretty easy for the user to forget to call `super`. Unfortunately, this is a check that is beyond the standard JS linting tools as it requires whole world type information.
I'm proposing adding a new diagnostic group which issues a warning when it sees this. Users can suppress the warning if the omission was intentional.
Contributor guide
Assessment
This issue has not been assessed yet.