1.0.1 • Published 1 year ago

@reverse-hr/eslint-config v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

← Reverse's Front-End Configs

ESLint

# npm
npm install --save-dev eslint @reverse-hr/eslint-config

# yarn
yarn add --dev eslint @reverse-hr/eslint-config

Note: The following ESLint configuration does not include style-related rules; these kinds of stuff are handled very well by Prettier.

Create an .eslintrc.json in the root directory of your project, then copy the following content into it based on the environment you need to support.

JavaScript

{
  "root": true,
  "extends": [
+   "@reverse-hr/eslint-config"
  ]
}

TypeScript

{
  "root": true,
  "extends": [
    "@reverse-hr/eslint-config",
+   "@reverse-hr/eslint-config/typescript" // ← Put on the bottom
  ]
}

React

{
  "root": true,
  "extends": [
    "@reverse-hr/eslint-config",
+   "@reverse-hr/eslint-config/typescript" // ← Put on the bottom
  ]
}

TypeScript + React

{
  "root": true,
  "settings": {
    "react": {
      "version": "detect"
    }
  },
  "extends": [
    "@reverse-hr/eslint-config",
    // ↓ Put both on the bottom with this specific order.
+   "@reverse-hr/eslint-config/typescript",
+   "@reverse-hr/eslint-config/react"
  ]
}