Prevents you from accidentially commenting very big assets. Make sure that you have optimized all your assets.
- Add the script to your repo
- Configure lint-staged
"lint-staged": {
"*": ["node ./scripts/check-files-size.js"],
}
Done! Now your repository will not bloat from unexpectedly big files.