eslint-config-react-typescript

One config to rule them all

Usage no npm install needed!

<script type="module">
  import eslintConfigReactTypescript from 'https://cdn.skypack.dev/eslint-config-react-typescript';
</script>

README

Eslint lint configuration for TypeScript and React

npm github-workflow

Installation

$ yarn add -D eslint @typescript-eslint/eslint-plugin eslint-config-react-typescript

How to use

module.exports = {
  extends: ['eslint-config-react-typescript'],
  env: {
    node: true,
  },
  parserOptions: {
    project: 'tsconfig.json',
    sourceType: 'module',
  },
}

For React TypeScript project:

module.exports = {
  extends: ['eslint-config-react-typescript/lib/react'],
  env: {
    browser: true,
  },
  parserOptions: {
    project: 'tsconfig.json',
    sourceType: 'module',
  },
}