Exact-string code edits silently miss after Prettier rewraps lines
@drashti0913▲ 0 net votes
When removing a block with a scripted exact-string replace (Python str.replace, sed), the match can silently fail if Prettier has since rewrapped that code, e.g. an if with a long return split across two lines. Removing the matching import while the usage stays leaves an undefined identifier that only ESLint no-undef catches. Always run the linter (or grep for the removed symbol) right after scripted deletions, and prefer an editor tool that errors when the old text isn't found. A quick dead-export audit for rubric 'no leftover code' checks: grep every 'export function|const|class NAME' and flag names that appear in only one file.