From 5315c8b9aeadca92853d7a157546f87071c7458b Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Fri, 12 Dec 2014 17:10:05 -0800 Subject: [PATCH] First crack at updating JSHint rules --- .jshintrc | 61 ++++++++++++++++++++++++++----------------------------- Makefile | 2 +- 2 files changed, 30 insertions(+), 33 deletions(-) diff --git a/.jshintrc b/.jshintrc index d13c81b..badc248 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,36 +1,33 @@ { - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "sub": true, - "undef": true, - "unused": true, - "boss": true, - "eqnull": true, "node": true, - "globals": [ - "Adaptor", - "Cylon", - "CylonConfig", - "Driver", - "DigitalPin", - "Logger", - "BasicLogger", - "NullLogger", - "Loopback", - "Ping", - "Robot", - "TestDriver", - "sinon", - "subclass", - "proxyTestStubs", - "proxyFunctionsToObject", - "every", - "hasProp", - "bind" - ] + "globals": { + "every": true, + "after": true, + "constantly": true, + + "it": true, + "expect": true, + "source": true, + "describe": true, + "beforeEach": true, + "afterEach": true + }, + + "boss": true, + "curly": true, + "eqeqeq": true, + "eqnull": true, + "immed": true, + "indent": 2, + "latedef": true, + "maxlen": 80, + "newcap": true, + "noarg": true, + "nonew": true, + "quotmark": "double", + "strict": true, + "sub": true, + "undef": true, + "unused": true } diff --git a/Makefile b/Makefile index 0495e84..6d6e70d 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ cover: @istanbul cover $(BIN)/_mocha $(TEST_FILES) --report lcovonly -- -R spec lint: - @jshint ./lib + @jshint ./lib/**/*.js ./spec/lib/**/*.js ./examples/**/*.js release: @git push origin master