-
Notifications
You must be signed in to change notification settings - Fork 193
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
Document recommended eslint/prettier workflow #1474
Comments
@miketaylr looks good 👍 it's I think the best way. |
+1 Do we want to add a hook to lint automatically before committing? |
It was my first thought and I made it in my initial PR. But after I did not know if it was good or practical to do that especially after the comment of @karlcow #1434 (comment) |
@magsout Just to clarify, I was just talking about linting. Not fixing :) Not a fan of automated fixing either, so I agree with @karlcow. Linting is something people like to forget (as same as running the build and wondering, why the styles are missing... Me. Always. 😁) So basically a hook that would lint after you |
Decision: we'd like to figure out a pre-commit style workflow. But possibly good to document manual way as well? |
So something like: "scripts": {
"precommit": "lint-staged",
},
"lint-staged": {
"{webcompat/static/js/lib,tests}__}/**/*.js": [
"npm run lint"
]
}, |
So with a pre-commit lint, I guess once you try to commit w/ style errors, it will fail and then it's up to you to run |
@miketaylr |
Cool, thanks! I can live with that. :) @magsout want to implement what you wrote in #1474 (comment)? |
@miketaylr certainly |
Support for prettier landed in #1468.
We should determine a simple workflow, and document it so we're all on the same page.
Strawman proposal:
The text was updated successfully, but these errors were encountered: