1 | # @loopback/eslint-config
|
2 |
|
3 | Shared ESLint config to enforce a consistent code style for LoopBack development
|
4 |
|
5 | ## Installation
|
6 |
|
7 | ```shell
|
8 | npm install --save @loopback/eslint-config
|
9 |
|
10 | npm install --save-dev \
|
11 | eslint \
|
12 | @typescript-eslint/eslint-plugin \
|
13 | @typescript-eslint/parser \
|
14 | eslint-config-prettier \
|
15 | eslint-plugin-eslint-plugin \
|
16 | eslint-plugin-mocha
|
17 | ```
|
18 |
|
19 | ## Basic Use
|
20 |
|
21 | Add `.eslintrc.json` file to your project, for example:
|
22 |
|
23 | ```json
|
24 | {
|
25 | "extends": "@loopback/eslint-config"
|
26 | }
|
27 | ```
|
28 |
|
29 | **NOTE**:
|
30 |
|
31 | Due to
|
32 | [the limitation of how ESLint plugins are loaded](https://github.com/eslint/rfcs/tree/master/designs/2018-simplified-package-loading),
|
33 | the [peerDependencies](package.json) of this module should be added to
|
34 | `devDependencies` of your `package.json`.
|
35 |
|
36 | ## Contributions
|
37 |
|
38 | - [Guidelines](https://github.com/loopbackio/loopback-next/blob/master/docs/CONTRIBUTING.md)
|
39 | - [Join the team](https://github.com/loopbackio/loopback-next/issues/110)
|
40 |
|
41 | ## Contributors
|
42 |
|
43 | See
|
44 | [all contributors](https://github.com/loopbackio/loopback-next/graphs/contributors).
|
45 |
|
46 | ## License
|
47 |
|
48 | MIT
|