Sublime Forum

JS, Babel,Node. BuildSystem & Linter paths local vs global

#1

Trying to find any information with regard to the local and global paths in sublime, Node and Babel regarding SublimeLinter & BuildSystem paths, or the concept of what would be best in most cases.

Would it be a good idea to try and install packages local to each project with only Node global?
Would it be a bad idea to create $PATH vars for BuildSystem and Linter paths?

Im totally new to this so I may be way off, just looking for any helpful info. Thanks

0 Likes

#2

If you want to work on multiple projects or different versions of a project it’s usually best to keep most packages locally. However, I find it’s much easier to work with globally installed linters and compilers, e.g. if you want to use them with SublimeLinter. In many cases Node modules like Grunt also somewhat require being installed globally. If it so happens that I have to work on something that’s on a different version, I’ll either upgrade it first or find a work around.

In theory everything local is more flexible, but I don’t find it very practical for linters and compilers.

1 Like

#3

Thanks for the reply. That is what I am struggling with most… my linter setup. I have node, babel-cli and eslint installed Global. I am working with a Meteor sketch project and trying to “eslint --init” for local .eslintrc setup, I had it working but managed to break it while trying to get linting smooth with the JSX React syntax. Lots of things to get right! Thanks

0 Likes

#4

[quote=“vanDeusen, post:3, topic:30041”]Lots of things to get right
[/quote]

Well, good luck :slight_smile:

Perhaps I should mention that usually in our team we also have the linters installed locally in the project so we can have a Grunt task that also runs on our CI/test server. So, there is a .eslintrc file at the root of the project and eslint for SublimeLinter should pick that one over the one in my home directory. But again, my approach is to rely on a good global setup for linting in the editor, and then have the local configuration for linting in CI and sharing the configuration with the team. I’m not sure it’s the best approach, but at least I don’t have to deal with editor plugins not finding the local node_modules or .rc files.

1 Like