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

Accept commands in addition to NPM scripts #47

Closed
k15a opened this issue Sep 6, 2016 · 1 comment
Closed

Accept commands in addition to NPM scripts #47

k15a opened this issue Sep 6, 2016 · 1 comment

Comments

@k15a
Copy link

k15a commented Sep 6, 2016

Hey,

I was wondering why I have to add git add and eslint --fix to the npm scripts to use them with lint-staged.

For example my package.json has to be:

"scripts": {
  "git:add": "git add",
  "eslint:fix": "eslint --fix"
},
"lint-staged": {
  "*.js": ["eslint:fix", "git:add"]
}

and I think it could be:

"lint-staged": {
  "*.js": ["eslint --fix", "git add"]
}

Is there any limitation, I am not aware of, so it can't be supported?

@okonet
Copy link
Collaborator

okonet commented Sep 6, 2016

Very good point, I was thinking about adding this into the future versions as well.

@okonet okonet mentioned this issue Sep 8, 2016
Merged
7 tasks
@okonet okonet closed this as completed in 682a4b9 Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants