{
"$type": "site.standard.document",
"path": "/are-you-linting-yet/",
"publishedAt": "2015-12-03T21:27:00.000Z",
"site": "at://did:plc:6gssgguzeecdttuw4gpdshg2/site.standard.publication/self",
"tags": [
"react",
"javascript",
"lint",
"eslint"
],
"textContent": "If you aren't you should be! If you are like me, you have a love and hate relationship with Javascript. It's used to do so much, but it's loose rule set makes it a potential nightmare.\n\nAt work we already were using Checkstyle and FindBugs for our Java code, so why not apply the same idea to our Javascript and React code?\n\nThere a few options, but we chose to go with eslint. It has a large number of plugins and support for React.\n\nSetup was dead simple. Create a .eslintrc file in the project root. Then add gulp-eslint to the gulp build chain.\n\nWe decided to follow the airbnb style. We did make some small alterations.\n\n[Embedded code (GitHub Gist)]\n\nNow what happened next was not as simple:\n\n[Image: Screen-Shot-2015-12-02-at-2-19-32-PM.png]\n\nClean up was pretty easy. Most of those errors and warnings were the use of var or small style violations. After a couple of hours we now have a much cleaner, consistent and more maintainable Javascript and React code.\n\nRead the original post with all embeds and interactive content at https://rants.broonix.ca/are-you-linting-yet/",
"title": "Are you linting yet?"
}