Package: eslint-config-react-typescript
Created by: ruanyl
Last modified: Fri, 15 Jul 2022 17:52:33 GMT
Version: 1.0.10
License: MIT
Downloads: 1,144
Repository: https://github.com/ruanyl/eslint-config-react-typescript
Install
npm install eslint-config-react-typescript
yarn add eslint-config-react-typescript
Eslint lint configuration for TypeScript and React
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',
},
}