[npm] added lint and lintroller scripts

This commit is contained in:
spalger 2015-09-22 18:58:14 -07:00
parent 53ab36e1b4
commit 3510336077
2 changed files with 21 additions and 1 deletions

View file

@ -43,7 +43,9 @@
"start": "./bin/kibana --dev",
"precommit": "grunt lintStagedFiles",
"karma": "karma start",
"elasticsearch": "grunt esvm:dev:keepalive"
"elasticsearch": "grunt esvm:dev:keepalive",
"lint": "grunt eslint:source",
"lintroller": "grunt eslint:fixSource"
},
"repository": {
"type": "git",

View file

@ -1,7 +1,25 @@
var resolve = require('path').resolve;
module.exports = function (grunt) {
return {
// just lint the source dir
source: {
options: {
cache: resolve(grunt.config.get('root'), '.eslint.fixSource.cache')
},
files: {
src: '<%= lintThese %>'
}
},
// just lint the source dir
fixSource: {
options: {
cache: resolve(grunt.config.get('root'), '.eslint.fixSource.cache'),
fix: true
},
files: {
src: '<%= lintThese %>'
}