At Mastering JS, we love ESLint. However, ESLint is one of those tools that we strive to work with as little as possible. Every minute you spent tinkering with your linter config is a minute that you're not spending working on features or fixes. So make sure it's worth the effort!
Here's some of our most popular tutorials for ESLint:
4) Intro to ESLint Config Files
This tutorial shows how to get started with your own ESLint config, including what version of JavaScript you're using and what rules you want to enforce.
Once you know how to create an ESLint config file, you need to configure rules. Even if you're using a preset config, like Standard, you may find yourself wanting to overwrite default rules that don't make sense for your application. This tutorial shows you how to configure ESLint rules, from basic enable/disable to sophisticated config options.
ESLint can fix violations of certain rules automatically. Here's how you can use --fix
, including how to set --fix
when using npm scripts.
1) Ignore Lines and Files In ESLint
Isn't it ironic that our most popular ESLint tutorial is how to disable ESLint? Well intentioned lint rules are helpful, but there's an exception to just about every rule. This tutorial shows you how to disable one ESLint rule for one line, one ESLint rule for one file, or ignore all rules in one file.
Top comments (0)