Error when pushing
weilonge opened this issue · comments
This issue happens when I try to apply git push origin HEAD
:
> devtools-core@0.0.1 prepush /Users/seanlee/Projects/react_learning/devtools-core
> yarn run lint && yarn run flow
yarn run v1.3.2
warning package.json: No license field
$ yarn run lint-css -s; a=$?; yarn run lint-js -s; b=$?; test $a -eq 0 -a $b -eq 0
warning package.json: No license field
$ stylelint packages/devtools-launchpad/**/*.css -s
Error: You must use a valid syntax option, either: scss, less or sugarss
at getCode.then.code (/Users/seanlee/Projects/react_learning/devtools-core/node_modules/stylelint/lib/getPostcssResult.js:57:15)
at <anonymous>
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
warning package.json: No license field
$ eslint packages/devtools-launchpad/src; eslint packages/devtools-reps/src; eslint packages/devtools-components/src -s
Invalid option '-s' - perhaps you meant '-h'?
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! devtools-core@0.0.1 prepush: `yarn run lint && yarn run flow`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the devtools-core@0.0.1 prepush script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/seanlee/.npm/_logs/2017-12-15T22_47_51_944Z-debug.log
husky - pre-push hook failed (add --no-verify to bypass)
error: failed to push some refs to 'git@github.com:weilonge/devtools-core.git'
Seems like I'm not the only one who stumbled upon this. 🙂
The trailing -s
option for stylelint
and eslint
on the following line cause the issue:
$ yarn run lint-css -s; a=$?; yarn run lint-js -s; b=$?; test $a -eq 0 -a $b -eq 0
I've checked the docs for yarn run
and there seems to be no -s
option whatsoever.
thanks @kootoopas @weilonge feel free to make a PR :)
also push with --no-verify
e.g git push --no-verify
Feels like -s
for stylelint
could be the same as --syntax
, which expect a given file type (See in styleint CLI doc https://stylelint.io/user-guide/cli/)
Can't make it fail for some reason :( Even after yarn nom.
@weilonge or @kootoopas could you try to remove the -s
arg after yarn lint-css
and tell us if that fixes the issue ?