Skip to content

Commit 19fe7a2

Browse files
committed
Tweak generated README
1 parent c2cbc0e commit 19fe7a2

File tree

1 file changed

+45
-44
lines changed

1 file changed

+45
-44
lines changed

template/README.md

Lines changed: 45 additions & 44 deletions
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
- [Deploying](#deploying)
2222
- [Something Missing?](#something-missing)
@@ -88,7 +88,46 @@ Instead, it will copy all the configuration files and the transitive dependencie
8888

8989
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.
9090

91-
## How To...
91+
## How To
92+
93+
### Displaying Lint Output in the Editor
94+
95+
>Note: this feature is available with `[email protected]` and higher.
96+
97+
Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint.
98+
99+
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.
100+
101+
You would need to install an ESLint plugin for your editor first.
102+
103+
>**A note for Atom `linter-eslint` users**
104+
105+
>If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked:
106+
107+
><img src="http://i.imgur.com/yVNNHJM.png" width="300">
108+
109+
Then make sure `package.json` of your project ends with this block:
110+
111+
```js
112+
{
113+
// ...
114+
"eslintConfig": {
115+
"extends": "./node_modules/react-scripts/config/eslint.js"
116+
}
117+
}
118+
```
119+
120+
Projects generated with `[email protected]` and higher should already have it.
121+
If you don’t need ESLint integration with your editor, you can safely delete those three lines from your `package.json`.
122+
123+
Finally, you will need to install some packages *globally*:
124+
125+
```sh
126+
npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype
127+
```
128+
129+
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.
130+
92131

93132
### Installing a Dependency
94133

@@ -247,9 +286,9 @@ Please be advised that this is also a custom feature of Webpack.
247286

248287
**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.
249288

250-
### Installing React Bootstrap
289+
### Adding Bootstrap
251290

252-
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:
291+
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:
253292

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

@@ -273,44 +312,6 @@ import { Navbar, Jumbotron, Button } from 'react-bootstrap';
273312

274313
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.
275314

276-
### Displaying Lint Output in the Editor
277-
278-
>Note: this feature is available with `[email protected]` and higher.
279-
280-
Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint.
281-
282-
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.
283-
284-
You would need to install an ESLint plugin for your editor first.
285-
286-
>**A note for Atom `linter-eslint` users**
287-
288-
>If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked:
289-
290-
><img src="http://i.imgur.com/yVNNHJM.png" width="300">
291-
292-
Then make sure `package.json` of your project ends with this block:
293-
294-
```js
295-
{
296-
// ...
297-
"eslintConfig": {
298-
"extends": "./node_modules/react-scripts/config/eslint.js"
299-
}
300-
}
301-
```
302-
303-
Projects generated with `[email protected]` and higher should already have it.
304-
If you don’t need ESLint integration with your editor, you can safely delete those three lines from your `package.json`.
305-
306-
Finally, you will need to install some packages *globally*:
307-
308-
```sh
309-
npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype
310-
```
311-
312-
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.
313-
314315
### Adding Flow
315316

316317
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)