UNPKG

1.73 kBMarkdownView Raw
1[![Version][version-svg]][package-url] [![Build Status][circleci-svg]][circleci-url] [![License][license-image]][license-url]
2
3# RdBird ESLint Configuration
4
5This is the RdBird configuration for the code checker [ESLint](http://eslint.org).
6The main purpose is to share codestyle, best practises for every rdbird projects.
7
8## Project installation
9
10### 1. Install dependency
11```sh
12npm install @rdbird/eslint-config eslint --save-dev
13```
14
15### 2. Update `.eslintrc.json`
16Use all plugins :
17```json
18{
19 "root": true,
20 "extends": [
21 "@rdbird/eslint-config"
22 ]
23}
24```
25
26*OR*
27
28Cherry-pick plugins :
29```json
30{
31 "root": true,
32 "extends": [
33 "@rdbird/eslint-config/base",
34 "@rdbird/eslint-config/react",
35 "@rdbird/eslint-config/jsx-a11y",
36 "@rdbird/eslint-config/flowtype"
37 ]
38}
39```
40
41### 3. Update `package.json`
42
43```json
44{
45 "scripts": {
46 "lint": "eslint .",
47 "format": "eslint . --fix"
48 }
49}
50```
51
52Then you can launch lint in a terminal
53```sh
54npm run lint
55```
56
57## Architecture
58
59For a better community alignment the configuration extends StandardJS :
60
61
62__ Standard JS [https://standardjs.com/]() __
63
64
65Inspiration also comes from :
66* [AirBnB](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base)
67* [Supermind](https://github.com/supermind/eslint-config-supermind)
68
69[version-svg]: https://img.shields.io/npm/v/@rdbird/eslint-config.svg?style=flat-square
70[package-url]: https://www.npmjs.com/package/@rdbird/eslint-config
71[circleci-svg]: https://circleci.com/gh/RdBird/eslint-config.svg?style=shield
72[circleci-url]: https://circleci.com/gh/RdBird/eslint-config
73[license-image]: http://img.shields.io/badge/license-MIT-green.svg?style=flat-square
74[license-url]: LICENSE