User:Aron Manning/Global npm modules

Installing node modules globally
Only for those not afraid of taking risks and learning lessons.

If you don't want a 40+ MiB 'node_modules' folder in all of the projects then you can take the route of installing modules globally: delete the `node_modules` folder and run: npm link eslint  &&  npm link  eslint-config-wikimedia  &&  npm link  eslint-plugin-json@1.4.0  &&  npm link  eslint-plugin-mediawiki  &&  npm link  eslint-plugin-no-jquery  &&  npm link  eslint-plugin-qunit  &&  npm link  grunt-banana-checker  &&  npm link  stylelint  &&  npm link  stylelint-config-wikimedia Do this at your own risk. You'll need to regularly manually update global modules. Different version installed globally than used by Continuous Integration (CI) can result in different behavior on your system, although that seldom happens. But when it does, you can expect to spend a few hours finding out the cause. The worst that can happen is a failed CI build, though. Milage may vary, balance cost and benefit in your context.

To update global packages run: npm i --link eslint-plugin-json@1.4.0  eslint-plugin-no-jquery  eslint-plugin-qunit  stylelint This can be used for installation too, but takes much longer if the modules are already installed.

To uninstall these global packages run: npm un -s -g eslint  eslint-config-wikimedia  eslint-plugin-json  eslint-plugin-no-jquery  eslint-plugin-qunit  grunt-banana-checker  stylelint  stylelint-config-wikimedia  svgo