ESLint Flashcards

1
Q

How do you use ESLint

A

Install the eslint package and run eslint init to create the configuration file called .eslintrc.json. This includes base Javascript linting with recommended javascript settings.

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

What are plugins

A

You can install plugins to enhance the ESlint functionality. Plugins such as react-specific eslint-plugin-react or eslint-plugin-react-hooks.

They always include ‘plugin’ in the name.

Add it to the list of ‘plugins’ and the ‘extends’ to extend with recommended settings.

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

What is a parser

A

It allows ESlint to parse the code behind the scenes so that it can lint it properly. For example a typescript parser can parse typescript so that Eslint can understand the code, with it’s type annotations.

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