Open aendra-rininsland opened 7 years ago
Ideally this should work without needing to configure the path to the local flow binary. If you take a look at how linter-eslint does this, it automatically looks for a project-local eslint before trying the global one. There's even an option to only enable eslint if an .eslintrc is present; this could work the same way vis-a-vis .flowconfig
:
Configuring linter-flow using ./node_modules/.bin/flow
seems to be broken for me right now, but regardless, it's a hack.
Since this isn't coming with a pull request attached, consider it an argument for the ideal UI here. :)
As per #67, setting Flow path to
./node_modules/.bin/flow
definitely loads the local Flow binary.That said, it feels like this could be more intuitive — perhaps by assuming local flow-bin by default if the path isn't set in settings. It feels like using the local version of Flow is the current best practice (able to control Flow version based on
package.json
being the primary benefit; not having to deal with arbitrarily-versioned Flow binaries between projects being the other), and I didn't even realise using a local flow-bin was possible until I searched the issue queue.Even in #67, it's never really mentioned that setting a relative path is an option (the fact that the field's label says "Absolute path to the Flow executable on your system." doesn't help).