From d0ade1d190dd8f7bc2cb3169f8fadc44d433c7cd Mon Sep 17 00:00:00 2001 From: Murat Sutunc Date: Tue, 3 Feb 2015 11:30:12 -0800 Subject: [PATCH] CB-8410 Enable jshint for Android platform --- .jshintignore | 2 ++ .jshintrc | 10 ++++++++++ package.json | 6 ++++-- spec/.jshintrc | 11 +++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .jshintignore create mode 100644 .jshintrc create mode 100644 spec/.jshintrc diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 00000000..e87aa4bc --- /dev/null +++ b/.jshintignore @@ -0,0 +1,2 @@ +bin/node_modules/* +bin/templates/project/* diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000..89a121cf --- /dev/null +++ b/.jshintrc @@ -0,0 +1,10 @@ +{ + "node": true + , "bitwise": true + , "undef": true + , "trailing": true + , "quotmark": true + , "indent": 4 + , "unused": "vars" + , "latedef": "nofunc" +} diff --git a/package.json b/package.json index b63f18b8..39741d2b 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,9 @@ "apache" ], "scripts": { - "test": "jasmine-node --color spec", - "test-build": "rm -rf \"test create\"; ./bin/create \"test create\" com.test.app 応用 && \"./test create/cordova/build\" && rm -rf \"test create\"" + "test": "npm run jshint && jasmine-node --color spec", + "test-build": "rm -rf \"test create\"; ./bin/create \"test create\" com.test.app 応用 && \"./test create/cordova/build\" && rm -rf \"test create\"", + "jshint": "node node_modules/jshint/bin/jshint bin && node node_modules/jshint/bin/jshint spec" }, "author": "Apache Software Foundation", "license": "Apache version 2.0", @@ -25,6 +26,7 @@ }, "devDependencies": { "jasmine-node": "~1", + "jshint": "^2.6.0", "promise-matchers": "~0" } } diff --git a/spec/.jshintrc b/spec/.jshintrc new file mode 100644 index 00000000..17eae32c --- /dev/null +++ b/spec/.jshintrc @@ -0,0 +1,11 @@ +{ + "node": true + , "bitwise": true + , "undef": true + , "trailing": true + , "quotmark": true + , "indent": 4 + , "unused": "vars" + , "latedef": "nofunc" + , "jasmine": true +}