Skip to content

Commit

Permalink
Added tips for npm run lint and build errors (#151) (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
romarioraffington authored and coryhouse committed Aug 21, 2017
1 parent e0a8524 commit 8d68161
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ This will run the automated build process, start up a webserver, and open the ap
4. Make sure files with names that begin with a dot (.babelrc, .editorconfig, .eslintrc) are copied to the project directory root. This is easy to overlook if you copy this repository manually.
5. Don't run the project from a symbolic link. It may cause issues with file watches.
6. Delete any .eslintrc that you're storing in your user directory. Also, disable any ESLint plugin / custom rules that you've enabled within your editor. These will conflict with the ESLint rules defined in this project.
7. Make sure you don't have NODE_ENV set to production on your machine. If you do then the [development dependencies won't be installed](https://github.com/coryhouse/react-slingshot/issues/400#issuecomment-290497767). Here's [how to check](http://stackoverflow.com/a/27939821/26180).
7. Make sure you don't have NODE_ENV set to production on your machine. If you do then the [development dependencies won't be installed](https://github.com/coryhouse/react-slingshot/issues/400#issuecomment-290497767). Here's [how to check](http://stackoverflow.com/a/27939821/26180).
8. Tip: Things to check if you get an `npm run lint` error or build error:

* If ESW found an error or warning in your project (e.g. console statement or a missing semi-colon), the lint thread will exit with `Exit status 1`. To fix:

1. Change the `npm run lint` script to `"esw webpack.config.* src tools; exit 0"`
1. Change the `npm run lint:watch` script to `"esw webpack.config.* src tools --watch; exit 0"`

> Note: Adding `exit 0` will allow the npm scripts to ignore the status 1 and allow ESW to print all warnings and errors.
* Ensure the `eslint`/`esw` globally installed version matches the version used in the project. This will ensure the `esw` keyword is resolved.

## Technologies
Slingshot offers a rich development experience using the following technologies:
Expand Down

0 comments on commit 8d68161

Please sign in to comment.