-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Husky and lint-staged linting automate tools on pre-commit event #114
base: frontend
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wygląda super, chociaż naszła mnie pewna rozkmina jak sprawdzałem kod 😄 Napisz co o tym myślisz. Jeżeli uważasz, że to podejście jest OK, to jak dla mnie masz zielone światło, żeby mergować 😀
"lint-staged": { | ||
"./src/**/*.{js,jsx}": "eslint --fix", | ||
"./src/**/*.{jsx,js,scss}": "prettier --write", | ||
"./src/**/*.scss": "stylelint --fix" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W sumie tutaj takie pytanie. Czy zawsze dla nas --fix
będzie pożądany? Automatyczne fixy mogą powodować trochę bałaganu i przed commitem nie jesteśmy w stanie nad nimi zapanować 😅 To potencjalnie będzie powodowało kolejne problemy. Czy ewentualnie jesteśmy w stanie zmienić te fixy na zwykłe --check
? Co o tym myślisz @PixelSculptor ?
This PR adds 2 automate tools:
When you edit files in ui/src that have .js, .jsx or scss extension and then add to stage, all these files will be checked and linted automatically before commit, if eslint detects something wrong, then throws an error and thanks to this we will not push rubbish code and commits and we will fix all before extending our history of repo.