Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-monar

Monar16MIT2.0.2

Monar eslint config

typescript, eslint, eslintconfig, prettier, react

readme

Monar eslint-config

Install

yarn add -ED eslint-config-monar

Setup

Extend your .eslintrc configuration with:

extends: ['monar'],

Configure a tsconfig.json file to the root of the workspace if you don't already have one:

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "lib": ["es2017", "dom"],
    "rootDir": "src",
    "jsx": "react",
    "strict": true,
    "esModuleInterop": true,
    "moduleResolution": "node",
    "experimentalDecorators": true
  },
  "exclude": ["node_modules"]
}

React (optional)

Install peer dependencies:

yarn add -ED eslint-plugin-react eslint-plugin-react-hooks

Extend your .eslintrc configuration with:

extends: ['monar/react'],

Helpers

Add these to your package.json scripts:

"scripts": {
  "lint": "eslint --ext .js,.jsx,.ts,.tsx ./src",
  "lint:fix": "eslint --fix --ext .js,.jsx,.ts,.tsx ./src"
}