linter-patch-errors-singleline package
Patches the linter package to make all errors singleline.
Intimidated by all those red squigglies? No more!
Before | After |
---|---|
Installation
-
Install the linter package.
-
Install this package, either from the Settings View in Atom, or from the command line:
apm install linter-patch-errors-singleline
Questions & Answers
How does this work?
It's a hack.
This package require()
😒 a file in the linter package and monkey-patches a method on a class in there. The monkey-patched version of the method mutates all messages reported by linters, changing the range ends so that all errors and warnings appear to be singleline.
Why hacking instead of forking?
Pros
You can always install the latest official versions without having to wait for me to update.
Cons
This package may break unexpectedly if linter is refactored. However, the monkey-patch is very small, so it should be easy to fix.
linter-ui-default instead?
Why not monkey-patchIt makes sense for linter to report the full ranges for errors, and leave it up to UI packages to decide how to display them. I tried to do this, but ended up having to mutate the ranges anyway. Then I could just as well monkey-patch linter itself, which was easier. It also means that this package works with any UI package.
Why isn't this an option of the official packages?
See steelbrain/linter-ui-default#398 (comment) and onwards.