Playing with circles (vite + react + ts)
npm run dev # start dev server
npm run build # build for production
npm run serve # locally preview production build
npm run fix # run all of the below:
npm run prettier # run prettier --write
npm run eslint # run eslint --fix
npm run tsc # run tsc --no-emit
- Use latest stable node (
nvm install 16
) - Init with
create-vite
(npm init vite@latest . -- --template react-ts
) - Tighten
package.json
- Add
engines
- Use exact versions
- Run
npx npm-check-updates -u)
- Add
- Improve DX
- Increase
tsconfig.json
strictness - Add
prettier
&eslint
- Add
vite-plugin-checker
(fortsc
&eslint
in dev/build)
- Increase