Commit 4ca7b0da authored by Dan Abramov's avatar Dan Abramov Committed by GitHub
Browse files

Document how to add linting in an editor

parent 9a4e9678
No related merge requests found
Showing with 26 additions and 0 deletions
+26 -0
......@@ -219,6 +219,30 @@ Please be advised that this is also a custom feature of Webpack.
**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.
### Display Lint Output in the Editor
>Note: this feature is available with `react-scripts@0.2.0` and higher.
Some editors, including Sublime Text and Atom, provide plugins for ESLint. You would need to install such a plugin first. Once you install and enable an ESLint plugin for your editor, make sure `package.json` of your project ends with this block:
```js
{
// ...
"eslintConfig": {
"extends": "./node_modules/react-scripts/config/eslint.js"
}
}
```
Projects generated with `react-scripts@0.2.0` and higher should already have it.
There are two limitations:
* This only works with npm >= 3 because of [an ESLint issue](https://github.com/eslint/eslint/issues/3458).
* You can’t delete these lines. We don’t like configuration as much as you do, and [are looking for better solutions](https://github.com/facebookincubator/create-react-app/issues/215).
If you don’t need ESLint integration with your editor, you can safely delete those three lines from your `package.json`.
### Add Flow
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:
......@@ -277,6 +301,8 @@ We will consider integrating more tightly with Flow in the future so that you do
### Deploy to GitHub Pages
>Note: this feature is available with `react-scripts@0.2.0` and higher.
First, open your `package.json` and add a `homepage` field.
It could look like this:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment