linter-flow
linter-flow copied to clipboard
Configurable path to .flowconfig
It would be nice to be able to point where .flowconfig lives. I've got a project where both react-native and web share a lot of code but not the same .flowconfig
For example, in my package.json I have a script defenition "flow:native": "yarn run flow ./native" to execute flow specifically for the react-native project pointing flow to the directory where .flowconfig lives.
I've currently solved the problem by pointing linter-flow to a bash script that redirects the request:
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
$DIR/../node_modules/.bin/flow $1 $DIR/../dom/ $2
Where in my case .flowconfig lives in $DIR/../dom/