Skip to content

Commit 8d68161

Browse files
romarioraffingtoncoryhouse
authored andcommitted
Added tips for npm run lint and build errors (#151) (#460)
1 parent e0a8524 commit 8d68161

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,17 @@ This will run the automated build process, start up a webserver, and open the ap
5151
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.
5252
5. Don't run the project from a symbolic link. It may cause issues with file watches.
5353
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.
54-
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).
54+
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).
55+
8. Tip: Things to check if you get an `npm run lint` error or build error:
56+
57+
* 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:
58+
59+
1. Change the `npm run lint` script to `"esw webpack.config.* src tools; exit 0"`
60+
1. Change the `npm run lint:watch` script to `"esw webpack.config.* src tools --watch; exit 0"`
61+
62+
> Note: Adding `exit 0` will allow the npm scripts to ignore the status 1 and allow ESW to print all warnings and errors.
63+
64+
* Ensure the `eslint`/`esw` globally installed version matches the version used in the project. This will ensure the `esw` keyword is resolved.
5565

5666
## Technologies
5767
Slingshot offers a rich development experience using the following technologies:

0 commit comments

Comments
 (0)