Skip to content
This repository was archived by the owner on Mar 29, 2020. It is now read-only.

Commit 76e6a14

Browse files
committed
docs(readme): apply general improvements
1 parent 312a62c commit 76e6a14

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

README.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ Anvilabs' ESLint config, following our internal styleguide. Makes use of [pretti
1010

1111
## Usage
1212

13-
Install the conventions by running:
13+
This config relies dangerously on npm@3/yarn flatter tree for its dependencies (because of eslint/issues/3458), so installation may be as simple as:
1414

1515
```bash
16-
$ npm install --save-dev eslint prettier eslint-config-anvilabs
16+
$ yarn add eslint prettier eslint-config-anvilabs --dev
17+
# or
18+
$ npm install eslint prettier eslint-config-anvilabs --save-dev
1719
```
1820

19-
Then add the extends to your `.eslintrc.json`:
21+
Then add the extends to your `.eslintrc.js`:
2022

2123
```js
22-
{
23-
"extends": "anvilabs",
24-
"rules": {
24+
module.exports = {
25+
extends: 'anvilabs',
26+
rules: {
2527
// your overrides
26-
}
27-
}
28+
},
29+
};
2830
```
2931

3032
### Other configs
@@ -34,31 +36,30 @@ This config also exposes a few other configs that we use often and pull in as ne
3436
You can use them standalone:
3537

3638
```js
37-
{
38-
"extends": "anvilabs/<config-name>"
39-
}
39+
module.exports = {
40+
extends: 'anvilabs/<config-name>',
41+
};
4042
```
4143

4244
Or in combination with the base config (recommended):
4345

4446
```js
45-
{
46-
"extends": ["anvilabs", "anvilabs/<config-name>"]
47-
}
47+
module.exports = {
48+
extends: ['anvilabs', 'anvilabs/<config-name>'],
49+
};
4850
```
4951

5052
Available configs include:
5153

52-
- `"anvilabs/babel"` for usage with [babel transformations](https://github.com/babel/babel-eslint)
53-
- `"anvilabs/flowtype"` for [Flow](https://flowtype.org/) related rules
54-
- `"anvilabs/jest"` for [Jest](https://facebook.github.io/jest/) related rules
55-
- `"anvilabs/lodash"` for [Lodash](https://lodash.com/) related rules
56-
- `"anvilabs/react"` for [React](https://facebook.github.io/react/) related rules
57-
- `"anvilabs/react-native"` for [React Native](https://facebook.github.io/react-native/) related rules
54+
- `'anvilabs/babel'` for usage with [babel transformations](https://github.com/babel/babel-eslint)
55+
- `'anvilabs/flowtype'` for [Flow](https://flowtype.org/) related rules
56+
- `'anvilabs/jest'` for [Jest](https://facebook.github.io/jest/) related rules
57+
- `'anvilabs/lodash'` for [Lodash](https://lodash.com/) related rules
58+
- `'anvilabs/react'` for [React](https://facebook.github.io/react/) related rules
59+
- `'anvilabs/react-native'` for [React Native](https://facebook.github.io/react-native/) related rules
5860

5961
### Things to know
6062

61-
- All plugins needed for rules used by these configs are dependencies of this module so you don't have to install anything on your own.
6263
- Running ESLint will report an error if your code does not match prettier style. The rule is autofixable – if you run ESLint with the `--fix` flag, your code will be formatted according to prettier style.
6364

6465
## Credits

0 commit comments

Comments
 (0)