WordPress-ish JavaScript Code Standard – ESlint Config

I’m spending a lot of time with JavaScript these day, and find linting tools to be invaluable for spotting some mistakes. I started off with JShint plugged in to Sublime Text via this JSHint plugin.

More recently I’ve switched to ESlint. It seems to identify more issues and formatting problems than before, is easy to configure, and is also extensible.

I’m gradually tweaking an ESlint configuration file that somewhat matches the WordPress coding standards (with some of my own amendments), and thought I’d release it here:

https://gist.github.com/johngodley/b2114d8ff65a6b0767b6

It’s not perfect yet by any means, so make of it what you can. Hopefully it will improve with time.