Late to the party, but you can use npm --userconfig=/path/to/.npmrc.dev ..., see https://stackoverflow.com/a/39296450/107013 and https://docs.npmjs.com/cli/v11/using-npm/config#userconfig.
npm --userconfig=/path/to/.npmrc.dev ...