NextJS Starter Kit Docs
  • ⭐NextJS Starter Kit
  • 🚀Get started
    • SEO
    • Custom styles
    • Multiple Fonts
    • Dark Mode
    • Linting & Formatting
    • Miscellaneous
Powered by GitBook
On this page
  • Overview
  • Tech used
  • How to customize
  • Linting
  • Formatting
  • Other resources
  1. Get started

Linting & Formatting

PreviousDark ModeNextMiscellaneous

Last updated 1 year ago

Overview

Linting and formatting work out of the box in this starter kit. You simply have to edit the configuration files according to your needs, and you're done!

Tech used

  • : For linting and enforcing rules.

  • : For formatting the code.

  • : To check linting and format staged files.

  • : Pre-commit hooks to run linting and formatting before every commit.

How to customize

Linting

All the contents/rules of linting are in the .prettierrc.json file. You can edit that file to add, remove or update any styles.

You can find all the rules you can configure here:

Formatting

All the contents/rules of linting are in the .eslintrc.json file. You can edit that file to add, remove or update any styles.

After changing any of the above file, you should make sure all the files in your project follow those rules.

  • After making change in linting rules, run bunx eslint --fix .

  • After making changes in formatting rules, run bunx prettier --write .

Other resources

You can find all the rules you can configure here:

ESLint:

Prettier:

🚀
ESLint
Prettier
Lint Staged
Husky
https://eslint.org/docs/latest/rules/
https://prettier.io/docs/en/options
https://eslint.org/
https://prettier.io/