tensor5 / linter-jslinter

JSLint plugin for Atom Linter
https://atom.io/packages/linter-jslinter
MIT License
1 stars 0 forks source link

Why don't ya add jslinter as a dependency in your package.json? #2

Open fusion809 opened 8 years ago

fusion809 commented 8 years ago

Hi,

I'm surprised this package doesn't, instead of asking users to install jslinter, merely require it as a package dependency listed in package.json. That is, with something like this added to package.json:

dependencies: {
  "jslinter": "1.5.2"
},

Thanks for your time, Brenton

tensor5 commented 8 years ago

It would definitely be easier for users, but then I should release a new version each time jslinter updates. Generally speaking as a Linux fan I prefer using globally installed tools or libraries, but in this case I'm still thinking about it.

fusion809 commented 8 years ago

Appending a caret top (^) to before the version number of jslinter (i.e., changing "1.5.2" in the above package.json snippet to "^1.5.2") will cause the latest available version of jslinter (provided it is at least 1.5.2) to be installed.

fusion809 commented 8 years ago

But of course, that means only at the time that this atom package is installed will the latest version of jslinter be installed. So maybe you could add an auto-updating feature to this package? So that if a later version of jslinter is available than that installed in the node_modules subfolder of the package, it will be installed in place of the current version. If you want a specific shell command for this package to run, you could try:

rm -rf $PATH_TO_PACKAGE/node_modules/jslinter
cd $PATH_TO_PACKAGE
apm install
tensor5 commented 8 years ago

Yes, checking for updates can be an idea, if it can be done in background without slowing down the startup time.

fusion809 commented 8 years ago

The autocomplete-go package installs (granted not in the background, it has a pop-up dialog asking whether to run go get -u github.com/nsf/gocode) the gocode package locally and doesn't seem to slow down startup much.