When dealing with large, old code bases (like I'm doing on a daily basis) you'll often want to migrate something in a large quantity of files. For this, you should have the necessary tests and linters in place, to be able to change things confidently. However, what happens when errors happen? I adopted some tools for dealing with errors in a large number of files.
If you need to change a spefic kind of file, the most basic step will be to find and list them all. The standard CLI utility for this is find
, and can be used in various ways:
find . -name 'tsconfig.json'
find src/ -iname '*test*'
find . -type d -name node_modules -prune -false -o -name package.json