Add linting to our mocha suite
This commit is contained in:
parent
8fde8a8921
commit
1cafdb8b1d
|
@ -5,7 +5,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "gulp dev",
|
"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"
|
"watch": "mocha watch --compilers js:babel-register --recursive"
|
||||||
},
|
},
|
||||||
"browserify": {
|
"browserify": {
|
||||||
|
@ -89,6 +89,7 @@
|
||||||
"jshint-stylish": "~0.1.5",
|
"jshint-stylish": "~0.1.5",
|
||||||
"lodash.assign": "^4.0.6",
|
"lodash.assign": "^4.0.6",
|
||||||
"mocha": "^2.4.5",
|
"mocha": "^2.4.5",
|
||||||
|
"mocha-eslint": "^2.1.1",
|
||||||
"mocha-jsdom": "^1.1.0",
|
"mocha-jsdom": "^1.1.0",
|
||||||
"mocha-sinon": "^1.1.5",
|
"mocha-sinon": "^1.1.5",
|
||||||
"sinon": "^1.17.3",
|
"sinon": "^1.17.3",
|
||||||
|
|
|
@ -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)
|
Loading…
Reference in New Issue