@raing3/eslint-config

0.4.1 • Public • Published

ESLint config npm-version CI

Shareable ESLint config for my JS projects.

Install

Run the following in your project directory:

npm install eslint @raing3/eslint-config --save-dev

Usage

Step 1. Add ESLint rules for the language being used.

Javascript:

Add the following to your ESLint config file:

{
  "extends": ["@raing3/eslint-config"]
}

TypeScript:

Install the TypeScript ESLint plugin:

npm install @typescript-eslint/eslint-plugin @typescript-eslint/parser --save-dev

Add the following to your ESLint config file:

{
  "extends": ["@raing3/eslint-config/typescript"],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "projec,t": ["./tsconfig.json"]
  }
}

Step 2. Add ESLint rules for the frameworks/libraries being used.

React:

Install the React ESLint plugin;

npm install eslint-plugin-react --save-dev

Add the following to your ESLint config file:

{
  "extends": ["@raing3/eslint-config/react"],
  "settings": {
    "react": {
      "version": "detect"
    }
  }
}

Jest:

Install the Jest ESLint plugin:

npm install eslint-plugin-jest --save-dev

Add the following to your ESLint config file:

{
  "extends": ["@raing3/eslint-config/jest"],
  "env": {
    "jest": true
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @raing3/eslint-config

Weekly Downloads

1

Version

0.4.1

License

MIT

Unpacked Size

21.7 kB

Total Files

9

Last publish

Collaborators

  • raing3