From the course: Building a Website with Node.js and Express.js

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Setting up ESLint and Prettier

Setting up ESLint and Prettier

From the course: Building a Website with Node.js and Express.js

Start my 1-month free trial

Setting up ESLint and Prettier

- [Instructor] A properly configured development environment helps you avoiding common pitfalls by taking care of consistent code formatting and pointing out possible problems. I think that regardless of what you're doing, this is something you should know how to set up. For that, I'm now going to install a set of tools to accomplish that. You can use that for any other project just like that. First I'm going to install ESLint. ESLint is a so-called linter. It uses a rule set to enforce some coding style rules and also points out common coding mistakes. For that, I now run npm install, dash d because it's a development dependency, ESLint. And after this is installed, takes a little bit, if we look into package.json we see that this was now added as dev dependency. This means if we deploy our project into production, ESLint should not be included. To initialize ESLint, we will use the common npx. Npx comes with…

Contents