'Is there a way to have "local-only" npm scripts so they aren't committed to repo?

I'm developing a React project, which normally runs on port 3000. However, on my machine that port is used by a Windows service that I'll be using for other projects. So, in my package.json for this project, I have the following setting:

"scripts": {
   "start": "webpack serve --open --port 3012"
    // All the other scripts
}

I'm wondering, is there any way to have this particular port setting set local only? I don't want to commit this package.json to the repo with this and annoy other developers who probably don't have my same setup. I was thinking maybe a local-only .json that can be referenced if it exists, but I have no idea. This is really just for convenience as I know I will forget to add the "--port" option on the terminal and then I'll curse myself out as my computer goes "Durr, that port is in use already, dummy." Any suggestions/ideas?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source