A simple template with some dependencies that I use to start my projects.
- React-hook-form
- Yup
- Zustand
- ChakraUI
- Inversify
- React-query
- Jest
- React Testing Library
- Typescript
- Husky
- Lint-staged
- Axios
Run the following command:
npx degit l-fernandocosta/web-starter <name of the project>
After this step, configure the husky:
- Install the dependencie -
npx husky-init && npm i
-
As default, husky create a file named
pre-commit
with the commandnpm test
. Update the command tonpm run lint-staged
-
package.json
already comes with the following configuration, but feel free to change it:
"lint-staged": {
"*.(tsx|ts)": "eslint --cache --fix",
"*": "prettier --write --ignore-unknown"
}
- You are ready to go ! 🔥
If you dont like the
page.tsx
route extension, you can change it on thenext.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
pageExtensions: ["page.tsx"], // <--- Update here
};
module.exports = nextConfig;