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 - JavaScript Tutorial
From the course: Learning Functional Programming with JavaScript ES6+
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
-
-
-
(Locked)
The goal of functional programming3m 38s
-
(Locked)
Declarative vs. imperative programming2m 46s
-
(Locked)
Immutability4m 18s
-
(Locked)
Separation of data and functions1m 47s
-
(Locked)
Converting object-oriented to functional code3m 29s
-
(Locked)
First-class functions2m 33s
-
(Locked)
Ensuring immutability with ESLint3m 14s
-
(Locked)
Installing and setting up ESLint1m 14s
-
(Locked)
Ensuring immutability: Finalize ESLint2m 27s
-
(Locked)
-
-
-
-
-