@iroachie/eslint-config
ESLint preset extending Airbnb, Prettier and Jest
Last updated a month ago by iroachie .
MIT · Original npm · Tarball · package.json
$ cnpm install @iroachie/eslint-config 
SYNC missed versions from official npm registry.

@iroachie/eslint-config

Eslint config utilizing Airbnb-base, Prettier and Jest support.

Plugins and configs used:

Additionally, it sets these environments:

{
  "env": {
    "browser": true,
    "node": true,
    "jest": true,
    "es6": true
  }
}

Installation

yarn add --dev eslint @iroachie/eslint-config

Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like

Usage

Add to your eslint config (.eslintrc, or eslintConfig field in package.json):

{
  "extends": "@iroachie"
}

Add the eslint extension for your editor. Example below is VSCode.

In your "User Settings" add the following lines:

"eslint.autoFixOnSave": true,
"editor.formatOnSave": false,
"eslint.validate": [
  {
    "language": "javascript",
    "autoFix": true
  },
  {
    "language": "javascriptreact",
    "autoFix": true
  },
  {
    "language": "typescript",
    "autoFix": true
  },
  {
    "language": "typescriptreact",
    "autoFix": true
  }
],

Example of extending the configuration

{
  "extends": "@iroachie",
  "rules": {
    "global-require": 0,
    "prefer-destructuring": 0
  }
}

Advanced Usage

Optionally in your repo you can set up githooks to format your code when you make a commit. You can follow the setup over here.

Current Tags

  • 0.0.3                                ...           latest (a month ago)

3 Versions

  • 0.0.3                                ...           a month ago
  • 0.0.2                                ...           a month ago
  • 0.0.1                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 44
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |