Open mxstbr opened 8 years ago
I have a few linting script for my react-boilerplate, structured like this:
"scripts": { "lint": "npm run lint:js && npm run lint:css", "lint:js": "eslint .", "lint:js:staged": "eslint-staged", "lint:css": "stylelint ./app/**/*.css", "lint:css:staged": "stylelint-staged", "lint:staged": "npm run lint:js:staged && npm run lint:css:staged" }
When using this (otherwise amazing) plugin, I get the following instead:
Which doesn't work because the : are stripped. Any ideas why this happens and how to fix it?
:
Thanks for this great plugin!
The same problem.
same issue here - does not like :targets
Submitted a PR that fixes this issue for me:
https://github.com/akoenig/npm-run.plugin.zsh/pull/8/files
If you don't mind a dependency on jq, you can change line 11 to this which feels a lot more robust:
compls=$([[ -s $PWD/package.json ]] || return 0 && jq -r '.scripts | keys | sort | .[]' package.json)
I have a few linting script for my react-boilerplate, structured like this:
When using this (otherwise amazing) plugin, I get the following instead:
Which doesn't work because the
:
are stripped. Any ideas why this happens and how to fix it?Thanks for this great plugin!