Use -a
flag to add project without opening new window:
npm config set editor 'atom -a'
Use npm edit .
to open the current project (just a lightly better habit than calling
atom -a
directly in case changing editor).
Also allows adding, e.g., npm edit depOfCurrentPackage
into Atom.
And it sets it as the editor for npm config edit
(to open the npm config file in Atom).