<commit_before>---
title: "ESLint Part 1: Exploration"
date: 2016-06-14T22:27:28.926Z
layout: post
path: /eslint-part-1-exploration/
next:
previous: /customizing-agile/
tags:
  - javascript
  - software
  - nodejs
  - reactjs
---

![eslint logo](https://static.sinap.ps/blog/2016/06_jun/eslint/eslint-logo.png)

I recently spent some time to review my [ESLint](http://eslint.org/) setup. It's got lots of rules, and a healthy ecosystem of plugins. It's intimidating! Maybe I can help you make some sense of it...

<div class='fold'></div>

## Why ESLint?

For a long time, [JSLint](http://www.jslint.com/), then [JSHint](http://jshint.com/) and [JSCS](http://jscs.info/) were the primary Javascript linting tools. They were important, because Javascript is such an easy language to make mistakes in. To wit, JSLint originally came from the author of [Javascript: The Good Parts](http://shop.oreilly.com/product/9780596517748.do), which famously covers a small subset of the language. Of course, the rest is suggested to be 'the bad parts' - JSLint was designed to help you avoid them!

There are three major factors that caused ESLint to become the gold standard for linting:

### 1. Support for modern Javascript

[React](https://facebook.github.io/react/) was released in early 2013, and with it came a return to compiling something other than pure Javascript into its final browser-ready form. [CoffeeScript](http://coffeescript.org/) was popular for a while, but seemed more like unnecessary syntactic sugar. React, however, was substantially easier to use with [JSX](https://facebook.github.io/react/docs/jsx-in-depth.html). To sweeten the pot, tools to translate JSX also included support for [ES2015](https://github.com/lukehoban/es6features). And none of the leading linters could handle JSX or modern Javascript syntax.

### 2. Plugin architecture

While the previous linting tools did have a large set of options to configure, adding something like JSX support required a fork of the project. In ESLint, however, support for something totally new could be added via plugin. [All sorts of plugins are available today](https://www.npmjs.com/search?q=eslint-plugin), vastly expanding upon ESLint's core value proposition.
<commit_msg>fix(post): Update to social-ready image<commit_after>---
title: "ESLint Part 1: Exploration"
date: 2016-06-14T22:27:28.926Z
layout: post
path: /eslint-part-1-exploration/
next:
previous: /customizing-agile/
tags:
  - javascript
  - software
  - nodejs
  - reactjs
---

![eslint logo](https://static.sinap.ps/blog/2016/06_jun/eslint/eslint-logo-rev2.png)

I recently spent some time to review my [ESLint](http://eslint.org/) setup. It's got lots of rules, and a healthy ecosystem of plugins. It's intimidating! Maybe I can help you make some sense of it...

<div class='fold'></div>

## Why ESLint?

For a long time, [JSLint](http://www.jslint.com/), then [JSHint](http://jshint.com/) and [JSCS](http://jscs.info/) were the primary Javascript linting tools. They were important, because Javascript is such an easy language to make mistakes in. To wit, JSLint originally came from the author of [Javascript: The Good Parts](http://shop.oreilly.com/product/9780596517748.do), which famously covers a small subset of the language. Of course, the rest is suggested to be 'the bad parts' - JSLint was designed to help you avoid them!

There are three major factors that caused ESLint to become the gold standard for linting:

### 1. Support for modern Javascript

[React](https://facebook.github.io/react/) was released in early 2013, and with it came a return to compiling something other than pure Javascript into its final browser-ready form. [CoffeeScript](http://coffeescript.org/) was popular for a while, but seemed more like unnecessary syntactic sugar. React, however, was substantially easier to use with [JSX](https://facebook.github.io/react/docs/jsx-in-depth.html). To sweeten the pot, tools to translate JSX also included support for [ES2015](https://github.com/lukehoban/es6features). And none of the leading linters could handle JSX or modern Javascript syntax.

### 2. Plugin architecture

While the previous linting tools did have a large set of options to configure, adding something like JSX support required a fork of the project. In ESLint, however, support for something totally new could be added via plugin. [All sorts of plugins are available today](https://www.npmjs.com/search?q=eslint-plugin), vastly expanding upon ESLint's core value proposition.

{'fraction_non_alphanumeric': 0.09949036117881675, 'fraction_numerical': 0.021936627520496344, 'mean_word_length': 4.445114595898673, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '929979', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1286, 'n_words': 556}