elicwhite / ESLint-Formatter

Sublime Text 3 Plugin to Autoformat with Eslint
MIT License
139 stars 20 forks source link

use local eslint if available #1

Closed hugomrdias closed 8 years ago

hugomrdias commented 8 years ago

this would be very useful relying on the system global module may be the best option

elicwhite commented 8 years ago

What do you get when running which eslint from your command line?

elicwhite commented 8 years ago

Closed due to inactivity. Feel free to provide more information if this is still a problem.

insin commented 8 years ago

The use case for this is not requiring ESLint to be installed globally at all, and even if it is installed globally, using a locally-available version first if present. This allows you to have different projects managing their own version of ESLint rather than being tied to the same global version.

This is how SublimeLinter does it, for reference: https://github.com/SublimeLinter/SublimeLinter3/blob/7bca95fb79edd038acfa17982495745245af4d7f/lint/node_linter.py#L104

elicwhite commented 8 years ago

That looks great. I'd happily accept a pull request adding this. That should also enable it to work with locally installed eslint plugins. I've been using the project specific plugin settings to set the path to my node_modules version.

xwartz commented 8 years ago

This pull fix it.

https://github.com/TheSavior/ESLint-Formatter/pull/13

platinumazure commented 8 years ago

@TheSavior Looks like the pull request didn't close this issue.

elicwhite commented 8 years ago

Should be fixed in 2.1.0 per https://github.com/TheSavior/ESLint-Formatter/pull/13