From 1cafdb8b1dbe06e29441316789a84720a897eeb3 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 21 Jun 2016 14:01:40 -0700 Subject: [PATCH] Add linting to our mocha suite --- package.json | 3 ++- test/unit/linting_test.js | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/unit/linting_test.js diff --git a/package.json b/package.json index 8c1f119cb..31ae0db95 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "private": true, "scripts": { "start": "gulp dev", - "test": "mocha --require test/helper.js --compilers js:babel-register --recursive && gulp lint", + "test": "mocha --require test/helper.js --compilers js:babel-register --recursive", "watch": "mocha watch --compilers js:babel-register --recursive" }, "browserify": { @@ -89,6 +89,7 @@ "jshint-stylish": "~0.1.5", "lodash.assign": "^4.0.6", "mocha": "^2.4.5", + "mocha-eslint": "^2.1.1", "mocha-jsdom": "^1.1.0", "mocha-sinon": "^1.1.5", "sinon": "^1.17.3", diff --git a/test/unit/linting_test.js b/test/unit/linting_test.js new file mode 100644 index 000000000..27b4b2b1e --- /dev/null +++ b/test/unit/linting_test.js @@ -0,0 +1,9 @@ +// LINTING: +const lint = require('mocha-eslint'); +const lintPaths = ['app/**/*.js', 'ui/**/*.js', '!node_modules/**', '!dist/**', '!docs/**', '!app/scripts/chromereload.js'] + +const lintOptions = { + strict: true, +} + +lint(lintPaths, lintOptions) \ No newline at end of file