Notes

Prettier & Pre-commit hooks

August 1, 2024
2024, Engineering
React, Nextjs, Notes

Introduction # Prettier is a code formatter for JS projects. There are two variations we need to deal with when configuring prettier Projects with package.json at root level # For these projects we need to run following commands npm install --save-dev --save-exact prettier npx prettier . --write npm install --save-dev husky lint-staged npx husky init This will install all the necessary packages. You need to create few config files using following commands ...

Jest and Droids

July 30, 2024
2024, Engineering
React, Nextjs, Notes

Introduction # In this post we will look at How to setup Jest for NextJS projects Setting up Android on Ubuntu Setting up Jest to existing NextJS projects # Jest is a good testing framework which makes easy practicing TDD on ReactJS projects. There are two ways of integrating Jest into NextJS projects: When starting from scratch # Its as easy as running following command: npx create-next-app@latest --example with-jest with-jest-app ...