This is a React + TypeScript + Tailwind CSS boilerplate to be built with Vite. It also includes ESLint 8, Vitest, Husky and a pre-commit hook that runs prettier --write
and eslint --fix
.
Create the project.
npx degit sbroccardi/ari-react-boilerplate my-app
Access the project directory.
cd my-app
Install dependencies.
yarn
Serve with hot reload at http://localhost:{PORT}.
yarn dev
yarn format
Run ESLint
yarn lint
Run ESLint and fix
yarn lint:fix
yarn build
yarn test
Workaround for Node Version Managers and GUIs
# ~/.config/husky/init.sh
export NVM_DIR=~/.nvm
#source $(brew --prefix nvm)/nvm.sh # This loads nvm with brew.sh
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # or this loads nvm
#exit 1 # test hook without committing