From the course: Learning Functional Programming with JavaScript ES6+

Unlock the full course today

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

Ensuring immutability: Install ESLint

Ensuring immutability: Install ESLint - JavaScript Tutorial

From the course: Learning Functional Programming with JavaScript ES6+

Start my 1-month free trial

Ensuring immutability: Install 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 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 easy 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