I often get an eslint
error in a Javascript file, which is trivial to fix - for example, trailing spaces or incorrect indentation:
In this case, I would have to ^XX
to navigate to the beginning of the line and delete two spaces. Not the end of the world, but some cases - like long lines that needs to be broken - are more cumbersome. Note that I am not looking for a complete auto-fix for the file, just a quick fix apply for the current highlighted problem.
Is there a way to define a key binding that would auto-fix the current eslint
error, if possible?
tabstop
,shiftwidth
,softtabstop
and perhapsshiftround
option – Christian Brabandt Jul 18 '17 at 8:28eslint
? – Adam Matan Jul 18 '17 at 8:31<<
should work, if your cursor is on the correct line – Christian Brabandt Jul 18 '17 at 8:34