Skip to content

Ignore build artifacts and tool directories in .flowconfig#5234

Open
captbaritone wants to merge 1 commit intofacebook:mainfrom
captbaritone:flowconfig-ignore-build-artifacts
Open

Ignore build artifacts and tool directories in .flowconfig#5234
captbaritone wants to merge 1 commit intofacebook:mainfrom
captbaritone:flowconfig-ignore-build-artifacts

Conversation

@captbaritone
Copy link
Copy Markdown
Contributor

Summary

  • Add .claude/ to Flow ignore list (Claude Code worktrees are full repo copies)
  • Add website/build/ and website/.docusaurus/ to Flow ignore list (docs build artifacts)

These directories were being parsed by Flow unnecessarily, inflating the file count from ~2.5k actual project files to ~36k total.

Source Files Should be parsed?
.claude/worktrees/ 14,246 No
website/build/ + website/.docusaurus/ 2,851 No
Root node_modules/ 16,629 Yes (haste resolution for fbjs, standard resolution for graphql, etc.)
Actual project files ~2,500 Yes

Test plan

Before this change:

$ ./node_modules/.bin/flow ls 2>/dev/null | grep -v '^Skipping' | wc -l
   36296

After:

$ ./node_modules/.bin/flow ls 2>/dev/null | grep -v '^Skipping' | wc -l
   19196

Breakdown by directory (after):

$ ./node_modules/.bin/flow ls 2>/dev/null | grep -v '^Skipping' \
    | sed "s|^$(pwd)/||" | cut -d'/' -f1 | sort | uniq -c | sort -rn
16629 node_modules
 2269 packages
  150 website
    9 scripts
    8 vscode-extension
    6 flow-typed
    ...

No .claude/, website/build/, or website/.docusaurus/ directories in the output.

Verify no new Flow errors introduced:

$ ./node_modules/.bin/flow status 2>&1 | tail -3
Found 2 errors

(The 2 errors are pre-existing cannot-resolve-name for performance — unrelated to this change.)

Flow was parsing ~36k files when only ~2.5k are actual project source.
The biggest offenders:
- .claude/worktrees/ (14k files) - Claude Code git worktrees
- website/build/ and website/.docusaurus/ (~2.8k files) - docs build output

This brings the parsed file count from ~36k down to ~19k (the remaining
~16k are root node_modules which must stay visible for haste module
resolution of fbjs and standard resolution of graphql, @testing-library,
etc).
@meta-cla meta-cla bot added the CLA Signed label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant