# Summary & Next Steps — ESLint and Prettier: Code Quality and Formatting

Source: https://www.skillbyai.com/en/eslint-prettier/eslint-prettier-25

> Recap the full ESLint and Prettier workflow and plan next steps, from editor setup to CI and shared configs.

## What you've mastered

Installation, configuration, integration with editors and CI/CD, custom rules, team setups, and best practices. You're ready to implement ESLint and Prettier in any project.

## See the full journey

From setup to CI/CD: the complete ESLint and Prettier workflow.

![Complete ESLint and Prettier workflow from local to CI.](assets/figures/eslint-prettier/eslint-prettier-learning-map.svg) — Figure 25.1 — The full development lifecycle with ESLint and Prettier.

## Keep learning and iterating

ESLint and Prettier evolve. Follow their release notes, experiment with new plugins, and refine your configuration as your codebase grows.

Final check

**Quiz:** What is a good next step in mastering code quality?

- [ ] Stop using linters
- [ ] Use defaults for everything forever
- [ ] Ignore CI
- [x] Apply ESLint and Prettier to your next project

*Answer:* Apply ESLint and Prettier to your next project. The best way to master these tools is to use them. Start with a simple setup and refine it over time based on your team's needs.

## Final quiz 1 of 8

Final quiz

**Quiz:** What is ESLint's main job?

- [ ] Compile code
- [ ] Deploy apps
- [x] Find problems and enforce code-quality rules
- [ ] Minify CSS

*Answer:* Find problems and enforce code-quality rules. Prettier handles formatting.

## Final quiz 2 of 8

Final quiz

**Quiz:** What does Prettier do?

- [ ] Finds undefined variables
- [ ] Runs tests
- [ ] Bundles files
- [x] Formats code consistently

*Answer:* Formats code consistently. It rewrites code to one consistent style.

## Final quiz 3 of 8

Final quiz

**Quiz:** Which file holds ESLint 9's default configuration?

- [x] eslint.config.js
- [ ] package-lock.json
- [ ] .eslintrc.json
- [ ] .prettierrc

*Answer:* eslint.config.js. Flat config is the default since ESLint 9.

## Final quiz 4 of 8

Final quiz

**Quiz:** Where should eslint-config-prettier go in your config?

- [ ] First
- [x] Last
- [ ] It does not matter
- [ ] In .gitignore

*Answer:* Last. Later entries override earlier formatting rules.

## Final quiz 5 of 8

Final quiz

**Quiz:** What does severity 'error' do?

- [ ] Only warns
- [ ] Disables the rule
- [x] Fails the lint run
- [ ] Fixes the code

*Answer:* Fails the lint run. Errors cause a non-zero exit code.

## Final quiz 6 of 8

Final quiz

**Quiz:** What does lint-staged do?

- [ ] Lints the whole repo
- [ ] Stages files automatically
- [ ] Installs Husky
- [x] Runs linters on staged files only

*Answer:* Runs linters on staged files only. It keeps pre-commit hooks fast.

## Final quiz 7 of 8

Final quiz

**Quiz:** Why run lint and format checks in CI?

- [x] To block problem code from merging
- [ ] To make builds slower
- [ ] To delete files
- [ ] To rename branches

*Answer:* To block problem code from merging. CI enforces rules for everyone.

## Final quiz 8 of 8

Final quiz

**Quiz:** How should a team adopt new rules?

- [ ] Enable all as errors at once
- [x] Start with warn and tighten gradually
- [ ] Disable lint
- [ ] Skip CI

*Answer:* Start with warn and tighten gradually. Gradual rollout reduces friction.
