Oni: Linter integration (`eslint` support)

Created on 9 Jan 2018  路  9Comments  路  Source: onivim/oni

Pulling this out from #659 - there was a question about supporting eslint as well. In addition, we use tslint heavily in this project.

It would be helpful if there was a way to integrate linters. We do support the Oni.diagnostics API, which allows for a plugin to push up diagnostics (like errors) - perhaps that is sufficient?

For eslint, potentially following the same pattern as oni-plugin-tslint would make sense - where it listens for buffer update events, and then runs the lint strategy against it, and pushes the errors up via the diagnostics API.

extensibility insider needs-disambiguation

Most helpful comment

Any updates or plans to work on this? :)

All 9 comments

@bryphe I started looking at this and the tslint plugin quite a while ago since I had a few issues with the tslint plugin I was trying to fix and because I also write a lot of js (as opposed to typescript).

I'm not sure how far I am from getting it working correctly, I just used the same format as you did with the oni-tslint-plugin but there are still some issues. Its fairly close 馃 and definitely further than nowhere its here if you'd like to take a look but definitely still a WIP.

Awesome, looks great @Akin909 ! Good to know that a plugin / extension can fill the gap - that our API is sufficient to implement this.

I want to mention https://github.com/pinterest/esprint because the idea is pretty good. Unfortunately the server newer worked for me other persons I now.

Is @Akin909 's plugin the recommended way to surface ESLint errors still? Thanks

@simonsmith its unfortunately still a WIP I have been working on a bunch of different things for oni and haven't had much time to look into this plugin further atm it still has some issues, I frankly cant remember what tbh, would definitely appreciate a hand if anyone wants to pitch in otherwise will have another look once some of my other pieces of work are resolved.

@Akin909 That's cool. I'm currently sizing up whether I can switch to Oni. If this is the only thing blocking me I'll take a look at the plugin. Thanks

I'd also love to see eslint support! There is an eslint-vscode plugin. Maybe it can be adapted? https://github.com/Microsoft/vscode-eslint

What about including standard linter as well?

Any updates or plans to work on this? :)

Was this page helpful?
0 / 5 - 0 ratings