From 1f79178f1df7458522d902263c2ccbf7513589ad Mon Sep 17 00:00:00 2001 From: Mark Skelton Date: Thu, 20 Jan 2022 08:57:02 -0600 Subject: [PATCH] Add install docs --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index af2c92b..0035c58 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,29 @@ [![changesets](https://img.shields.io/badge/maintained%20with-changesets-blue)](https://github.com/atlassian/changesets) Widen's shared ESLint config and plugins. + +## Installation + +```sh +yarn add -D eslint eslint-{config,plugin}-widen eslint-plugin-sort @babel/{core,eslint-parser} + +# If you use TypeScript +yarn add -D @typescript-eslint/{eslint-plugin,parser} + +# If you use React +yarn add -D eslint-plugin-{react,react-hooks,jsx-a11y} + +# If you use Jest +yarn add -D eslint-plugin-jest +``` + +## Usage + +In your `.eslintrc` file, add the following four entries to your extends list. +If you don't need a specific configuration, simply remove it from the list. + +```json +{ + "extends": ["widen", "widen/typescript", "widen/react", "widen/jest"] +} +```