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
Formatage des exemples avec prettier #106
Conversation
C'est une bonne idée mais ça fait pas le même travail, faut garder les deux (prettier pour formatter, eslint pour gueuler sur des éléments de syntaxe incorrect, etc.) et surtout l'intégrer au cycle de travail, genre en pre-commit ou autre. Je fais pas mal de commits atomiques et j'ai pas encore trouvé de moyen où l'automatisme me dégomme pas les commits partiels :-( |
2ae4e13
to
0b87e52
Compare
0b87e52
to
79eacb3
Compare
@oncletom OK donc j'ai utilisé T'en penses quoi ? |
"lint": "eslint --ignore-path .gitignore --fix '**/*.js'", | ||
"test": "exit 0", | ||
"posttest": "npm run lint" | ||
"posttest": "npm run format && npm run lint", | ||
"prepush": "npm t" |
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.
Ça fait quoi npm t
?
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.
c'est un raccourci pour npm run test
Oui ça me paraît cool comme ça – j'avais pas pensé au pre-push ! |
Cette série sur les scripts npm est instructive : https://egghead.io/lessons/tools-run-npm-scripts-with-git-hooks |
@DirtyF cool je vais mater ça merci :-) J'adore husky, l'intégration avec les scripts npm c'est exactement ça qu'il faut. |
Follow-up avec les auteurs du module prettier/prettier-eslint-cli#11 |
J'ai laissé les options par défaut, je te laisse voir ce que tu préfères.
mise à jour: utilisation de https://github.com/kentcdodds/prettier-eslint