@iroachie/eslint-config

0.0.3 • Public • Published

@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.

Readme

Keywords

Package Sidebar

Install

npm i @iroachie/eslint-config

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

8.73 kB

Total Files

5

Last publish

Collaborators

  • iroachie