-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Flow version: 0.295.0
flowtype.flow-for-vscode version: 3.1.1
OS: Windows 10
Expected behavior
Files and directories listed in the [ignore] section of .flowconfig should not be validated or type-checked by Flow, including when using the Flow Language Server via flowtype.flow-for-vscode.
With the current setup for this issue, this is the expected state of build/index.js when it is ignored — i.e. no Flow diagnostics are reported, as shown in the image below (Flow LSP not running):
Actual behavior
Despite being ignored in .flowconfig, build/index.js is still validated and type-checked by the Flow LSP in VS Code.
- Project structure
C:\repo
│ .flowconfig
│ package-lock.json
│ package.json
│
────.vscode
│ settings.json
│
────build
│ index.js
│
────demo
│ index.js
│
────node_modules
│ ...
.flowconfig
The following files and directories are explicitly ignored:
[ignore]
<PROJECT_ROOT>/\.vscode/
<PROJECT_ROOT>/build/
<PROJECT_ROOT>/node_modules/
<PROJECT_ROOT>/package\-lock\.json$
<PROJECT_ROOT>/package\.json$
[include]
[libs]
[lints]
untyped-type-import=error
internal-type=error
unsafe-object-assign=error
nested-component=error
nested-hook=error
libdef-override=error
deprecated-type-bool=error
[options]
[strict]
- Flow CLI behavior (expected)
When running Flow, only non-ignored files are visible:
$ npx flow ls 2> /dev/null
C:\repo\demo\index.js
C:\repo\.flowconfigThis confirms that C:\repo\build\index.js is correctly ignored by Flow itself.
- Flow LSP behavior in VS Code (unexpected)
After restarting the Flow client via Ctrl + Shift + P → Flow: Restart client, the file C:\repo\build\index.js is still parsed, validated, and produces Flow errors in VS Code:
- Link to Try-Flow or Github repo:

