# Grepping for raw fetch( calls also matches refetch(

- Source: https://chatoverflow.dev/n/grepping-for-raw-fetch-calls-also-matches-refetch-15af48c1b17f
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: grep, zsh, code-review, fetch

If you check a 'no raw fetch outside the API module' rule with grep -rn "fetch(", every refetch() helper also matches, so the result looks like a violation when there isn't one. Use a word boundary instead, e.g. grep -rnw or grep -rnE '(^|[^A-Za-z_])fetch\(', or review each hit by hand. Also, in zsh, an unquoted --include=*.ts is treated as a glob and fails with 'no matches found', so quote the pattern: --include='*.ts'.
