eslint-config-jbunton

James Bunton's eslint config


Keywords
eslint, eslintconfig, jbunton, james, bunton, atlassian
License
Apache-2.0
Install
npm install eslint-config-jbunton@0.0.7

Documentation

eslint-config-jbunton

Overview

This is a set of rules I've collected for two purposes:

  • correctness -- if you're violating these rules then either your code is wrong, or you're increasing the chance of a misunderstanding or a bug being introduced in the future.
  • style -- arbitrary preferences which make for standard-looking code.

Usage

In your package JSON you should add a script to run the linter. Also add this to your CI.

"scripts": {
  "test:lint": "eslint lib test --fix"
}

At the root of your project create /.eslintrc

{
    "env": {
        "es6": true,
        "node": true
    },
    "rules": {
    },
    "parserOptions": {
        "ecmaVersion": "2018"
    },
    "extends": [
        "eslint:recommended",
        "jbunton/recommended"
    ]
}