2.0.0-beta.0 • Published 4 years ago

@affinidi/eslint-config-react v2.0.0-beta.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
4 years ago

ESLint Config

Affinidi's ESLint Configuration For React Projects

Installation

npm install --save-dev @affinidi/eslint-config-react

Usage

// .eslintrc.js

module.exports = {
  extends: ['@affinidi/eslint-config-react'],
  parserOptions: {
    project: './tsconfig.eslint.json',
  },
}

It is reccommended that you have a separate tsconfig.eslint.json file that extends from your existing tsconfig.json file. This file will add .eslintrc.js to the "includes" property.

{
  "extends": "./tsconfig.json",
  "include": ["...", ".eslintrc.js"]
}

VS Code + Monorepos

VS Code's ESLint extension requires an additional setting to properly detect ESLint versions/installs/root paths. In a typical mono repo you can do the following:

"eslint.workingDirectories": [
  {
    "pattern": "./packages/*"
  }
]

For more details check out the extention's docs.