From the course: Learning Functional Programming with JavaScript ES6+

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Installing and setting up ESLint

Installing and setting up ESLint

- [Instructor] The first thing we're going to do is open up a terminal inside our Exercise Files folder. I'm going to use the integrated terminal inside VS code, but you're more than welcome to use Mac's built-in terminal, as well. And then inside our Exercise Files folder we're going to initialize an NPM package with npm init -y. Once we've done that we'll install eslint as a dev dependency by typing npm install --save-dev eslint. Then we'll initialize eslint for our project by running npx eslint--init. And then it's going to ask us a series of questions, so we'll answer those. And to make things easier on ourselves we're going to select use a popular style guide, when it asks how would you like to define a style for your project. This enables us to use a predefined set of rules. And we're going to select Airbnbs. And now we see that eslint created this eslintrc.js file for us. This file tells eslint what to look for in our code.

Contents