-
Notifications
You must be signed in to change notification settings - Fork 112
Don't load Flow if a .flowconfig cannot be found #95
Conversation
…h from workspace root - #81
checkFlow() | ||
findFlowConfigDir(vscode.workspace.rootPath).then(configPath => { | ||
if (!configPath) { | ||
console.log(`Not starting Flow: Could not find a .flowconfig after a backwards search from ${vscode.workspace.rootPath}.`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ends up in the vscode developer tools web inspector, which is better than nothing IMO.
I think sometimes people have something a |
That's a good point, yeah. I think the feature is important, think it's worth globing all folders ( removing any node_modules ) and look through all of those too? |
I am not entirely sure what exactly happens during activation, but as far as I can tell flow server isn't actually started until qualified file is loaded, so I'm not exactly sure what's being fixed here.
|
The issue is that it does an annoying popup in any workspace the first time you click on a JavaScript file when there's no Flow connection, perhaps tying that popup to not loading up the server. |
I think I could replace this with a much simpler "is this a typescript project?" check (which is the only time I don't want to be running Flow basically) |
What I ended up doing instead of this PR, for my own setup:
|
This issue happens a lot when |
This is so needed. |
Maybe it could be an option like how prettier-vscode does - which would only make it run if there was a flowconfig in the root. I'd recommend implementing it yourself, so maybe I should just close this PR rather than have it hanging around stopping other contributors from taking a shot at the problem. |
Before loading up the extension it will do a check from the workspace root. To my knowledge there is no way to declare a
.flowconfig
in a subfolder of your project, so this should be fine. ( @gabelevi can you confirm? )@Gozala wanna give it a review?
fixes #81