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

Support commands which throw error on -- argument #195

Closed
avaly opened this issue Jun 16, 2017 · 2 comments · Fixed by opencomponents/base-templates#128
Closed

Support commands which throw error on -- argument #195

avaly opened this issue Jun 16, 2017 · 2 comments · Fixed by opencomponents/base-templates#128

Comments

@avaly
Copy link
Contributor

avaly commented Jun 16, 2017

Using certain tools (e.g. Flow v0.48.0: flow focus-check) will not run correctly if they don't understand/expect an argument --.

Steps to reproduce

  1. git init
  2. npm init -y
  3. yarn add lint-staged [email protected]
  4. flow init
  5. .lintstagedrc:
    {
      "*.js": ["flow focus-check"]
    }
  6. index.js:
    // @flow
  7. git add .
  8. lint-staged

Actual result
The flow focus-check command will fail via lint-staged

Expected result
The flow focus-check command should pass, like it does when being run externally like: flow focus-check index.js

@avaly
Copy link
Contributor Author

avaly commented Jun 16, 2017

FYI: flow focus-check only supports one single file as an argument, so using it with lint-staged is currently not possible since it will throw error when more than one file is staged.

Hoping this gets addressed in facebook/flow#4189

However this should still be fixed in lint-staged.

okonet pushed a commit that referenced this issue Jun 18, 2017
Closes #195

BREAKING CHANGE: 

This might affect existing setups which depend on the `--` argument.
@gabrielhpugliese
Copy link

gabrielhpugliese commented Jul 3, 2017

Did that last PR fix this issue? It doesn't seem so to me. I still experience problems with flow :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment