@willycamargo/eslint-config

0.1.0 • Public • Published

Eslint Config

Eslint config for personal projects

1. Using

1.1. Install the library

npm install @willycamargo/eslint-config

1.2. Setup config by enviroment

NodeJS

Add file .eslintrc.json
{
  "extends": [
    "@willycamargo/eslint-config"
  ],
  "env": {
    "node": true
  }
}

Vanilla JS

Add file .eslintrc.json
{
  "extends": [
    "@willycamargo/eslint-config"
  ],
  "env": {
    "browser": true
  }
}

React JS (with create-react-app + import resolver)

Install babel-plugin-module-resolver
npm install --save-dev babel-plugin-module-resolver
Add file .eslintrc.json
{
  "extends": ["@willycamargo/eslint-config/react"],
  "env": {
    "browser": true
  },
  "parser": "babel-eslint",
  "plugins": ["react", "react-hooks"],
  "settings": {
    "import/resolver": {
      "babel-module": {
        "root": ["./src/"]
      }
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @willycamargo/eslint-config

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

3.12 kB

Total Files

4

Last publish

Collaborators

  • willycamargo