linter-flow icon indicating copy to clipboard operation
linter-flow copied to clipboard

Relative path for better support for multiple projects

Open note89 opened this issue 9 years ago • 3 comments

Hi i would like to use a relative path so that i can use ./node_modules/.bin/flow in my projects.

executablePath: Absolute path to the Flow executable on your system.

From what i can see in it seems to be implemented. So maybe update the docs ?

note89 avatar Sep 28 '16 09:09 note89

The path would be relative to where your .flowconfig file is found... which may not be the project root. I'm not sure I really want to note all the complexities that could be affecting that in a setting description.

If you want to write something up for just the readme though send in a PR and I'd be happy to review it 😉.

Arcanemagus avatar Sep 28 '16 17:09 Arcanemagus

As far as i can tell, the problem is that executablePath is not an absolute path, but in fact a relative path.

I think a fair bit of user pain could be saved by

  1. Changing the description of exectuablePath to "relative path to your project's .flowconfig to your flow executable
  2. Defaulting executablePath to node_modules/.bin/flow

I think this would also permanently solve the problem described in https://github.com/AtomLinter/linter-flow/issues/134.

ianwremmel avatar Nov 05 '16 23:11 ianwremmel

As stated, if you want to submit a PR making those changes I can review + merge it.

Just a note, the text should be something like "An absolute path to `flow` or a relative path to `flow` from the project's `.flowconfig`."

Arcanemagus avatar Dec 08 '16 00:12 Arcanemagus