This package contains an opinionated ESLint configuration for vanilla JS, Typescript and TSX for React.
Assuming your project has already installed the peerDependecies prettier
, eslint
(and potentially typescript
- if not run yarn add --dev eslint typescript prettier
), the following steps are necessary:
- Run
yarn add eslint @dvnch/eslint-config
- Create a new file called
.eslintrc.json
- Paste the following snippet into the file
{
"extends": ["./node_modules/@dvnch/eslint-config/{YOUR-VERSION}"]
}
Depending on your usecase replace {YOUR-VERSION} with one of the following:
javascript.json
typescript.json
react.json