mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[npm] added lint and lintroller scripts
This commit is contained in:
parent
53ab36e1b4
commit
3510336077
2 changed files with 21 additions and 1 deletions
|
@ -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",
|
||||
|
|
|
@ -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 %>'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue