Currently we're required to run npm run format to prettify the entire code and npm run lint:fix to fix the code. However, we can use Husky and lint-staged to automatically format those files which are staged into Git, making it more convenient.
We add Husky (which is a git hooks implementation for NodeJS projects) to execute our commands after pre-commit. We use lint-staged to filter out files which are in our staging area, and run our Prettify and ESLint commands there. This automation will massively increase code-maintenance in the future.
I'd like to implement this issue myself. Please let me know if its suitable.
Currently we're required to run npm run format to prettify the entire code and npm run lint:fix to fix the code. However, we can use Husky and lint-staged to automatically format those files which are staged into Git, making it more convenient.
We add Husky (which is a git hooks implementation for NodeJS projects) to execute our commands after pre-commit. We use lint-staged to filter out files which are in our staging area, and run our Prettify and ESLint commands there. This automation will massively increase code-maintenance in the future.
I'd like to implement this issue myself. Please let me know if its suitable.