Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.76 KB

Configuring and Running ESLint.md

File metadata and controls

36 lines (25 loc) · 1.76 KB

You've probably at least heard of ESLint before, but just in case you haven't. ESLint is tool for performing static analysis on your code and finding places where you're code might have some unexpected edge-cases. On it's best days, it can be a powerful tool to help you enforce best practices in your codebase. On it's worst days, it can annoy your co-workers with pendantic formatting issues and other stylistic nitpicks.

To install eslint:

npm install -D eslint

Next, you'll need to initialize a configuration file.

npm init @eslint/config

This will ask you a few questions:

? How would you like to use ESLint? …
  To check syntax only
❯ To check syntax and find problems
  To check syntax, find problems, and enforce code style

I'll let you answer those questions as you see fit. It's your enterprise application—you do what you want.

Setting Up a Rule

Let's take look at this rule.

Further Reading