Prettier & Linters Flashcards

1
Q

What is the order of precedence of the configuration of prettier?

A
  1. A “prettier” key in the package.json file
  2. A “.prettierrc” file (Optional extension .json)
  3. A “.prettierrc.js” file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why use Prettier?

A

It makes it easy to keep a single and consistent style guide when working on a project.

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

Prettier vs Linters, what’s the difference?

A

Linters have two types of rules: Formatting rules & Code-quality rules. Code-quality rules check for potential mistakes in your code. For example: no-unused-vars check for variables that are not used.

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

Why does Prettier have very few options?

A

Because it’s whole purpose is to stop the on-going debates over styles.

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

What is the order of precedence of the configuration of ESLint?

A
  1. Configuration Comments

2. A “.eslintrc.*” configuration file

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