Skip to content

willycamargo/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/"]
      }
    }
  }
}

About

Eslint config for personal projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published