Extending your PATH with:
export PATH=/usr/local/share/npm/bin:$PATH
isn’t a terrible idea. Having said that, you shouldn’t have to do it.
Run this:
npm config get prefix
The default on OS X is /usr/local, which means that npm will symlink binaries into /usr/local/bin, which should already be on your PATH (especially if you’re using Homebrew).
So:
npm config set prefix /usr/localif it’s something else, and- Don’t use
sudowith npm! According to the jslint docs, you should just be able tonpm installit.
If you installed npm as sudo (sudo brew install), try reinstalling it with plain ol’ brew install. Homebrew is supposed to help keep you sudo-free.