diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000000000..19ffa6e4b --- /dev/null +++ b/.jshintignore @@ -0,0 +1,5 @@ +node_modules/ +www/bower_components/ +www/code/codemirror-5.7/ +www/code/mode/ +www/code/codemirror.js diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000000000..ad70ca4fd --- /dev/null +++ b/.jshintrc @@ -0,0 +1,6 @@ +{ + "laxcomma": true, + "laxbreak": true, + "node": true, + "sub": true +} diff --git a/package.json b/package.json index e62340d72..ccc7b682b 100644 --- a/package.json +++ b/package.json @@ -7,5 +7,11 @@ "ws": "^1.0.1", "level": "~1.4.0", "nthen": "~0.1.0" + }, + "devDependencies": { + "jshint": "~2.9.1" + }, + "scripts": { + "lint": "jshint --config .jshintrc --exclude-path .jshintignore ." } } diff --git a/travis.yml b/travis.yml new file mode 100644 index 000000000..c7e40534f --- /dev/null +++ b/travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.12" +script: npm run-script lint