ESLint Module #48 Flashcards

1
Q

ESLint what’s it do again?

A

Calls out errors in your code, prevents infinite loops, check for duplicative switch statements etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do I install it?

A

npm install -g eslint

# create a `.eslintrc` configuration file
eslint --init
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do I run it on my js files?

A
# run ESLint against any file with
eslint yourfile.js
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What if you want to share your code with a team whoe prefers you use semi-colons and uses the Airbnb Style guide?

A

npm install –save-dev eslint-config-airbnb

How well did you know this?
1
Not at all
2
3
4
5
Perfectly