This is a Next.js project template to be used as a reference for future projects.
This project uses ESLint to enforce coding standards, ensuring that developers adhere to best practices and avoid common pitfalls. It also uses Prettier ensure consistent code style.
-
ESLint: Installing the ESLint extension for your code editor provides real-time feedback and highlighting of potential issues and errors in your code.
-
Prettier: Installing the Prettier extension for your code editor will enable automatic code formatting on save, ensuring that your code always adheres to prettier coding style guidelines.
NOTE: A config file is included to set prettier as default formatter to the current project. No need to enable it globally. -
Code Spell Checker (Optional): Consider adding Code Spell Checker extension to your editor to catch spelling and typographical errors in code.
To install the dependencies run:
npm install
Important: After dependencies are installed, restart your editor for the extensions to work properly.
Run the development server on localhost:3000:
npm run dev
Run the unit test:
npm run test
Format the code to prettier code style:
npm run format
Find linting errors:
npm run lint
Fix the fixable by the cli linting issues:
npm run lint:fix