halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

[Linter v2] Upgrade to new Linter API #158

Closed ymtszw closed 5 years ago

ymtszw commented 5 years ago

Attempts to resolve https://github.com/halohalospecial/atom-elmjutsu/issues/153

Since Linter 2.3.0 dropped Linter v1 API support, this patch upgrades Linter provider of Elmjutsu to be compatible with Linter v2 API.

I had tested this with Linter 2.3.0, linter-ui-default 1.7.1, and it seemingly works, but definitely require other people's eyes. Especially, I have not checked every kind of possible messages that can be emitted from elm compiler.

As stated in upgrade instruction:

Also, not explicitly stated but:

Other things I found:

Arcanemagus commented 5 years ago

text is replaced with excerpt and is now mandatory

The replacement is noted, but it looks like I missed the part where it was now mandatory when writing that.

It says description accepts markdown, though subset of HTML is valid in markdown, it can actually handle HTML as well

Interestingly it looks like the current implementation in linter-ui-default runs text descriptions through marked... but currently isn't sanitizing the result from function descriptions 🤦‍♂️. I wouldn't rely on that behaviour though as that's a bug.

And it is actually nice since it will not block our line-of-sight to actual buffer with large tooltip!

That's exactly why it isn't expanded by default 😉.