Skip to content
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

Lint staged files on pre-commit hook #3906

Merged
merged 3 commits into from Jan 19, 2019
Merged

Lint staged files on pre-commit hook #3906

merged 3 commits into from Jan 19, 2019

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Jan 17, 2019

Which issue, if any, is this issue related to?

None. This PR aims to improve our DX (Developer eXperience).

Is there anything in the PR that needs further explanation?

Because we may not notice the lint errors until our CI occurs them.

@jeddy3
Copy link
Member

jeddy3 commented Jan 18, 2019

Because we may not notice the lint errors until our CI occurs them.

Should we also run eslint as part of the precommit hook?

@ybiquitous
Copy link
Member Author

Make sense. I will push a new commit to this PR and change the PR title. 👌

Because we may not notice the lint errors until our CI occurs them.
@ybiquitous ybiquitous changed the title Run remark for committing markdown files Lint commiting files on pre-commit hook Jan 19, 2019
@ybiquitous ybiquitous changed the title Lint commiting files on pre-commit hook Lint staged files on pre-commit hook Jan 19, 2019
package.json Outdated
@@ -140,7 +140,11 @@
"lint-staged": {
"*.js": [
"prettier --write",
"eslint --max-warnings=0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[note] I excluded --cache option to lint files in the clean state. I think it no performance problem because of not for all JS files in the project.

@ybiquitous
Copy link
Member Author

I will push a new commit to this PR and change the PR title. 👌

Done. Please review again. 🙏

package.json Outdated Show resolved Hide resolved
Co-Authored-By: ybiquitous <473530+ybiquitous@users.noreply.github.com>
Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jeddy3 jeddy3 merged commit f703624 into stylelint:master Jan 19, 2019
@ybiquitous ybiquitous deleted the run-remark-on-pre-commit branch September 13, 2020 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants