1 | [![Version][version-svg]][package-url] [![Build Status][circleci-svg]][circleci-url] [![License][license-image]][license-url]
|
2 |
|
3 | # RdBird ESLint Configuration
|
4 |
|
5 | ## Project installation
|
6 |
|
7 | ### 1. Install dependency
|
8 | ```sh
|
9 | npm install @rdbird/eslint-config --save-dev
|
10 | ```
|
11 |
|
12 | ### 2. Update `.eslint.json`
|
13 | Use all plugins :
|
14 | ```json
|
15 | {
|
16 | "root": true,
|
17 | "extends": [
|
18 | "@rdbird/eslint-config"
|
19 | ]
|
20 | }
|
21 | ```
|
22 |
|
23 | *OR*
|
24 |
|
25 | Cherry pick plugins :
|
26 | ```json
|
27 | {
|
28 | "root": true,
|
29 | "extends": [
|
30 | "@rdbird/eslint-config/base",
|
31 | "@rdbird/eslint-config/react",
|
32 | "@rdbird/eslint-config/jsx-a11y",
|
33 | "@rdbird/eslint-config/flowtype"
|
34 | ]
|
35 | }
|
36 | ```
|
37 |
|
38 | ### 3. Update `package.json`
|
39 |
|
40 | ```json
|
41 | {
|
42 | "scripts": {
|
43 | "lint": "eslint .",
|
44 | "format": "eslint . --fix",
|
45 | }
|
46 | }
|
47 | ```
|
48 |
|
49 | Then you can launch lint in a terminal
|
50 | ```sh
|
51 | npm run lint
|
52 | ```
|
53 |
|
54 | [version-svg]: https://img.shields.io/npm/v/@rdbird/eslint-config.svg?style=flat-square
|
55 | [package-url]: https://www.npmjs.com/package/@rdbird/eslint-config
|
56 | [circleci-svg]: https://circleci.com/gh/RdBird/eslint-config.svg?style=shield
|
57 | [circleci-url]: https://circleci.com/gh/RdBird/eslint-config
|
58 | [license-image]: http://img.shields.io/badge/license-MIT-green.svg?style=flat-square
|
59 | [license-url]: LICENSE
|