I write a fair amount of Javascript for my job, and recently I was reminded that I should really be running eslint against my code to keep it up to our operating standards. So I ran it against my updates today before I commited them to the repository, and it was a huge PITA to fix all the minor style warnings. One solution to this would be to use WebStorm like some of the other Excellence Wranglers, since that’s a powerful IDE that can do dynamic linting as the code is written. But I hate using IDEs. I know they offer a lot of advantages, but to me nothing beats the simplicity of gvim (or MacVim for OSX). It’s got a GUI, so I’m not restricted to the terminal, but it has all the strengths of vi, which is my editor of choice.
But lo and behold – Syntastic – a vim plugin that can run any syntax checker, including eslint. I installed it, and now it lints my code every time I save the file. The only feature it doesn’t have that I’d like is the ability to automatically fix the errors, but that might be something I can hack in there later, or continue to just run via the command line. For now it’s enough that I see the problems a few at a time instead of waiting until I have an entire file written without enough spaces in my function calls.
I hope someone other than family reads your blog. Otherwise absolutely no one will understand what you just wrote.
On Wed, Jan 20, 2016 at 3:44 PM, Skit Skat Skoodle Doot wrote:
> Scott Stancil posted: ” I write a fair amount of Javascript for my job, > and recently I was reminded that I should really be running eslint against > my code to keep it up to our operating standards. So I ran it against my > updates today before I commited them to the reposi” >
LikeLiked by 1 person