Skip to content

Commit 4b54ac1

Browse files
committed
Merge pull request #198 from lencioni/alpha
Improve readme
2 parents 49e6669 + 5da397b commit 4b54ac1

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ React specific linting rules for ESLint
99

1010
Install [ESLint](https://www.github.com/eslint/eslint) either locally or globally.
1111

12-
npm install eslint
12+
```sh
13+
$ npm install eslint
14+
```
1315

1416
If you installed `ESLint` globally, you have to install React plugin globally too. Otherwise, install it locally.
1517

16-
$ npm install eslint-plugin-react
18+
```sh
19+
$ npm install eslint-plugin-react
20+
```
1721

1822
# Configuration
1923

@@ -46,8 +50,8 @@ Finally, enable all of the rules that you would like to use.
4650
"react/jsx-boolean-value": 1,
4751
"react/jsx-closing-bracket-location": 1,
4852
"react/jsx-curly-spacing": 1,
49-
"react/jsx-max-props-per-line": 1,
5053
"react/jsx-indent-props": 1,
54+
"react/jsx-max-props-per-line": 1,
5155
"react/jsx-no-duplicate-props": 1,
5256
"react/jsx-no-undef": 1,
5357
"react/jsx-quotes": 1,
@@ -56,10 +60,10 @@ Finally, enable all of the rules that you would like to use.
5660
"react/jsx-uses-react": 1,
5761
"react/jsx-uses-vars": 1,
5862
"react/no-danger": 1,
59-
"react/no-set-state": 1,
6063
"react/no-did-mount-set-state": 1,
6164
"react/no-did-update-set-state": 1,
6265
"react/no-multi-comp": 1,
66+
"react/no-set-state": 1,
6367
"react/no-unknown-property": 1,
6468
"react/prop-types": 1,
6569
"react/react-in-jsx-scope": 1,
@@ -73,12 +77,12 @@ Finally, enable all of the rules that you would like to use.
7377

7478
# List of supported rules
7579

76-
* [display-name](docs/rules/display-name.md): Prevent missing displayName in a React component definition
80+
* [display-name](docs/rules/display-name.md): Prevent missing `displayName` in a React component definition
7781
* [jsx-boolean-value](docs/rules/jsx-boolean-value.md): Enforce boolean attributes notation in JSX
7882
* [jsx-closing-bracket-location](docs/rules/jsx-closing-bracket-location.md): Validate closing bracket location in JSX
7983
* [jsx-curly-spacing](docs/rules/jsx-curly-spacing.md): Enforce or disallow spaces inside of curly braces in JSX attributes
80-
* [jsx-max-props-per-line](docs/rules/jsx-max-props-per-line.md): Limit maximum of props on a single line in JSX
8184
* [jsx-indent-props](docs/rules/jsx-indent-props.md): Validate props indentation in JSX
85+
* [jsx-max-props-per-line](docs/rules/jsx-max-props-per-line.md): Limit maximum of props on a single line in JSX
8286
* [jsx-no-duplicate-props](docs/rules/jsx-no-duplicate-props.md): Prevent duplicate props in JSX
8387
* [jsx-no-literals](docs/rules/jsx-no-literals.md): Prevent usage of unwrapped JSX strings
8488
* [jsx-no-undef](docs/rules/jsx-no-undef.md): Disallow undeclared variables in JSX
@@ -88,13 +92,13 @@ Finally, enable all of the rules that you would like to use.
8892
* [jsx-uses-react](docs/rules/jsx-uses-react.md): Prevent React to be incorrectly marked as unused
8993
* [jsx-uses-vars](docs/rules/jsx-uses-vars.md): Prevent variables used in JSX to be incorrectly marked as unused
9094
* [no-danger](docs/rules/no-danger.md): Prevent usage of dangerous JSX properties
91-
* [no-set-state](docs/rules/no-set-state.md): Prevent usage of setState
92-
* [no-did-mount-set-state](docs/rules/no-did-mount-set-state.md): Prevent usage of setState in componentDidMount
93-
* [no-did-update-set-state](docs/rules/no-did-update-set-state.md): Prevent usage of setState in componentDidUpdate
95+
* [no-did-mount-set-state](docs/rules/no-did-mount-set-state.md): Prevent usage of `setState` in `componentDidMount`
96+
* [no-did-update-set-state](docs/rules/no-did-update-set-state.md): Prevent usage of `setState` in `componentDidUpdate`
9497
* [no-multi-comp](docs/rules/no-multi-comp.md): Prevent multiple component definition per file
98+
* [no-set-state](docs/rules/no-set-state.md): Prevent usage of `setState`
9599
* [no-unknown-property](docs/rules/no-unknown-property.md): Prevent usage of unknown DOM property
96100
* [prop-types](docs/rules/prop-types.md): Prevent missing props validation in a React component definition
97-
* [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent missing React when using JSX
101+
* [react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent missing `React` when using JSX
98102
* [require-extension](docs/rules/require-extension.md): Restrict file extensions that may be required
99103
* [self-closing-comp](docs/rules/self-closing-comp.md): Prevent extra closing tags for components without children
100104
* [sort-comp](docs/rules/sort-comp.md): Enforce component methods order

0 commit comments

Comments
 (0)