See the companion YouTube video here - We show some examples of what Linters can do and how we would do some code.
Another very interesting aspect of Linters as Static Code Analysis tool is, that you can easily run a linter with a modern rule set over legacy code. It helps to find depreciated constructs or APIs.
ESLint is a quite versatile tool. Have a look into the awesome-eslint resource below to see a pretty comprehensive list of plugins available.
no-debuggerrule in ESLint helps to track calls to
debugger()in the code base.
First, use eslint as part of your IDE. Secondly, make the most of it by using extensions (see Resources below).