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 test configs on commit #2402

Merged
merged 3 commits into from
Aug 24, 2018
Merged

Lint test configs on commit #2402

merged 3 commits into from
Aug 24, 2018

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no

If yes, please describe the breakage.

Please Describe Your Changes

This will lint JavaScript test files on commit via lint-staged the same way it is done for TypeScript files.

@lukastaegert lukastaegert requested review from eventualbuddha, shellscape and guybedford and removed request for eventualbuddha August 13, 2018 05:32
@guybedford
Copy link
Contributor

I'm +1 to this in concept but I worry a little about the performance impact of this. Running on Windows the commit hook already overflows my memory in MINGW and result in me having to restart my terminal everytime I commit to Rollup. I know this is a very specific issue on a flakey system, but worth noting.

Is there no way to filter this hook to just apply to those files changed by the commit itself? Surely that is possible given the commit hook knows this information (calling git status or something?).

@lukastaegert
Copy link
Member Author

Is there no way to filter this hook to just apply to those files changed by the commit itself? Surely that is possible given the commit hook knows this information (calling git status or something?).

In fact that is exactly what lint-staged does. It takes only the staged files, looks if there is a hook configured and only runs those files through the appropriate prettier/linting hooks. Thus if you limit the scope of your commits, there should not be issues.

@guybedford
Copy link
Contributor

Ok sure, sounds good then.

@guybedford guybedford merged commit 528f327 into master Aug 24, 2018
@guybedford guybedford deleted the auto-lint-test-configs branch August 24, 2018 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants