Skip to content

Commit 884d567

Browse files
authored
Tweak generated README
1 parent 04a9d98 commit 884d567

File tree

1 file changed

+45
-44
lines changed

1 file changed

+45
-44
lines changed

template/README.md

+45-44
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ You can find the most recent version of this guide [here](https://github.com/fac
99
- [npm start](#npm-start)
1010
- [npm run build](#npm-run-build)
1111
- [npm run eject](#npm-run-eject)
12-
- [How To...](#how-to)
12+
- [How To](#how-to)
13+
- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
1314
- [Installing a Dependency](#installing-a-dependency)
1415
- [Importing a Component](#importing-a-component)
1516
- [Adding a Stylesheet](#adding-a-stylesheet)
1617
- [Post-Processing CSS](#post-processing-css)
1718
- [Adding Images and Fonts](#adding-images-and-fonts)
18-
- [Installing React Bootstrap](#installing-react-bootstrap)
19-
- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
19+
- [Adding Bootstrap](#adding-bootstrap)
2020
- [Adding Flow](#adding-flow)
2121
- [Adding Custom Environment Variables](#adding-custom-environment-variables)
2222
- [Deploying](#deploying)
@@ -89,7 +89,46 @@ Instead, it will copy all the configuration files and the transitive dependencie
8989

9090
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
9191

92-
## How To...
92+
## How To
93+
94+
### Displaying Lint Output in the Editor
95+
96+
>Note: this feature is available with `[email protected]` and higher.
97+
98+
Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint.
99+
100+
They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do.
101+
102+
You would need to install an ESLint plugin for your editor first.
103+
104+
>**A note for Atom `linter-eslint` users**
105+
106+
>If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked:
107+
108+
><img src="http://i.imgur.com/yVNNHJM.png" width="300">
109+
110+
Then make sure `package.json` of your project ends with this block:
111+
112+
```js
113+
{
114+
// ...
115+
"eslintConfig": {
116+
"extends": "./node_modules/react-scripts/config/eslint.js"
117+
}
118+
}
119+
```
120+
121+
Projects generated with `[email protected]` and higher should already have it.
122+
If you don’t need ESLint integration with your editor, you can safely delete those three lines from your `package.json`.
123+
124+
Finally, you will need to install some packages *globally*:
125+
126+
```sh
127+
npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype
128+
```
129+
130+
We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
131+
93132

94133
### Installing a Dependency
95134

@@ -248,9 +287,9 @@ Please be advised that this is also a custom feature of Webpack.
248287

249288
**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images). However it may not be portable to some other environments, such as Node.js and Browserify. If you prefer to reference static assets in a more traditional way outside the module system, please let us know [in this issue](https://github.com/facebookincubator/create-react-app/issues/28), and we will consider support for this.
250289

251-
### Installing React Bootstrap
290+
### Adding Bootstrap
252291

253-
You don’t have to use React Bootstrap together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps:
292+
You don’t have to use [React Bootstrap](https://react-bootstrap.github.io) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps:
254293

255294
**Step 1.** Install React Bootstrap and Bootstrap from NPM. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well.
256295

@@ -274,44 +313,6 @@ import { Navbar, Jumbotron, Button } from 'react-bootstrap';
274313

275314
Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap.
276315

277-
### Displaying Lint Output in the Editor
278-
279-
>Note: this feature is available with `[email protected]` and higher.
280-
281-
Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint.
282-
283-
They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do.
284-
285-
You would need to install an ESLint plugin for your editor first.
286-
287-
>**A note for Atom `linter-eslint` users**
288-
289-
>If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked:
290-
291-
><img src="http://i.imgur.com/yVNNHJM.png" width="300">
292-
293-
Then make sure `package.json` of your project ends with this block:
294-
295-
```js
296-
{
297-
// ...
298-
"eslintConfig": {
299-
"extends": "./node_modules/react-scripts/config/eslint.js"
300-
}
301-
}
302-
```
303-
304-
Projects generated with `[email protected]` and higher should already have it.
305-
If you don’t need ESLint integration with your editor, you can safely delete those three lines from your `package.json`.
306-
307-
Finally, you will need to install some packages *globally*:
308-
309-
```sh
310-
npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype
311-
```
312-
313-
We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
314-
315316
### Adding Flow
316317

317318
Flow typing is currently [not supported out of the box](https://github.com/facebookincubator/create-react-app/issues/72) with the default `.flowconfig` generated by Flow. If you run it, you might get errors like this:

0 commit comments

Comments
 (0)