-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update eslint #166
Comments
Unfortunately, this is a manual process right now. I have been collaborating with someone else to automate the process, but it has been rather difficult. But if you are interested, I clone eslint and run their browserify npm script. I copy that build output directly into the eslint plugin. |
Is it possible to have InteractiveLinter use the globally installed eslint instead? I use the babel-eslint parser and the jsx plugin, and both are configured in .eslintrc, but neither are having an effect. |
@aravindet It is certainly possible, but not quite that simple. Primarily because linters are loaded by interactive linter in memory and they run in a worker thread. The one option that has chance from your suggestion is to basically run commands via node (since that's what Brackets provides), and that will require some changes. Adding this is limiting because we will also need to create a parser for the output that goes to stdout in order to generate the data necessary for interactive linter to report the errors. This approach might be attainable if we created an eslint reporter that generates output as JSONLines with the data interactive linter needs. The alternative kind of implied with the suggestion is loading the module from global node_modules, which does not quite work because eslint loads files from disk and that's not possible from requirejs/browser environment. Please, keep the ideas coming! I am also thinking about how we can answer this problem. |
I understand, running eslint in a node.js process seems to be the best way forward. Instead of writing a parser for stdout, it might be possible to write a tiny wrapper in node, which uses the eslint API and returns output as JSON back to the the browser. I am new to Brackets extension development, but I found this doc about adding a node module to the extension and calling it from the client code. I could give it a try but I have a lot to learn before I get there (Brackets extension API, InteractiveLinter architecture, ESLint API). |
@aravindet yeah man, no problem! I appreciate you taking a look and initiative to come up with something. So you could probably use this old plugin I created to see how you can integrate a node plugin. So, perhaps we can create another eslint plugin that works over node. https://github.com/MiguelCastillo/Brackets-TomcatManager/blob/master/node/TomcatDomain.js I am happy to help you through this. |
I mentioned the issue in #153 but it is good to have a separate issue. |
How can i update eslint to its latest version?
The text was updated successfully, but these errors were encountered: