Bug 999737-add ESLint to run-all-loop-tests; update docs, rs=Standard, DONTBUILD
authorDan Mosedale <dmose@meer.net>
Wed, 01 Apr 2015 14:08:38 -0700
changeset 237175 c6b002187f587f7c5404bfbd172fe11c2d5e1a2d
parent 237174 7e032903ec9cb565dc8b8edcc7fb341afcb0d264
child 237176 895cf25d11fdee52b78430bdf139e1b11baa22ce
push id28528
push usercbook@mozilla.com
push dateThu, 02 Apr 2015 10:38:50 +0000
treeherdermozilla-central@cf8864126c58 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard, DONTBUILD
bugs999737
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 999737-add ESLint to run-all-loop-tests; update docs, rs=Standard, DONTBUILD
browser/components/loop/README.txt
browser/components/loop/run-all-loop-tests.sh
browser/components/loop/standalone/README.md
--- a/browser/components/loop/README.txt
+++ b/browser/components/loop/README.txt
@@ -35,16 +35,31 @@ at the same time as changes to their sou
 Hacking
 =======
 Please be sure to execute
 
   browser/components/loop/run-all-loop-tests.sh
 
 from the top level before requesting review on a patch.
 
+Linting
+=======
+run-all-loop-tests.sh will take care of this for you automatically, after
+you've installed the dependencies by typing:
+
+  ( cd standalone ; make install )
+
+If you install eslint and the react plugin globally:
+
+  npm install -g eslint
+  npm install -g eslint-plugin-react
+
+You can also run it by hand in the browser/components/loop directory:
+
+  eslint .
 
 Front-End Unit Tests
 ====================
 The unit tests for Loop reside in three directories:
 
 - test/desktop-local
 - test/shared
 - test/standalone
--- a/browser/components/loop/run-all-loop-tests.sh
+++ b/browser/components/loop/run-all-loop-tests.sh
@@ -7,22 +7,22 @@ if [ "$1" == "--help" ]; then
   exit 0;
 fi
 
 set -e
 
 # Main tests
 
 LOOPDIR=browser/components/loop
-#ESLINT=standalone/node_modules/.bin/eslint
-#if [ -x "${LOOPDIR}/${ESLINT}" ]; then
-#  echo 'running eslint; see http://eslint.org/docs/rules/ for error info'
-#  (cd ${LOOPDIR} && ./${ESLINT} .)
-#  echo 'eslint run finished.'
-#fi
+ESLINT=standalone/node_modules/.bin/eslint
+if [ -x "${LOOPDIR}/${ESLINT}" ]; then
+  echo 'running eslint; see http://eslint.org/docs/rules/ for error info'
+  (cd ${LOOPDIR} && ./${ESLINT} .)
+  echo 'eslint run finished.'
+fi
 
 ./mach xpcshell-test ${LOOPDIR}/
 ./mach marionette-test ${LOOPDIR}/manifest.ini
 
 # The browser_parsable_css.js can fail if we add some css that isn't parsable.
 #
 # The check to make sure that the media devices can be used in Loop without
 # prompting is in browser_devices_get_user_media_about_urls.js. It's possible
--- a/browser/components/loop/standalone/README.md
+++ b/browser/components/loop/standalone/README.md
@@ -43,19 +43,14 @@ For development, run a local static file
 Then point your browser at:
 
 - `http://localhost:3000/content/` for all public webapp contents,
 - `http://localhost:3000/test/` for tests.
 
 **Note:** the provided static file server for web contents is **not** intended
 for production use.
 
-Code linting
-------------
-
-    $ make lint
-
 License
 -------
 
 The Loop server code is released under the terms of the
 [Mozilla Public License v2.0](http://www.mozilla.org/MPL/2.0/). See the
 `LICENSE` file at the root of the repository.