mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -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",
|
"start": "./bin/kibana --dev",
|
||||||
"precommit": "grunt lintStagedFiles",
|
"precommit": "grunt lintStagedFiles",
|
||||||
"karma": "karma start",
|
"karma": "karma start",
|
||||||
"elasticsearch": "grunt esvm:dev:keepalive"
|
"elasticsearch": "grunt esvm:dev:keepalive",
|
||||||
|
"lint": "grunt eslint:source",
|
||||||
|
"lintroller": "grunt eslint:fixSource"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -1,7 +1,25 @@
|
||||||
|
var resolve = require('path').resolve;
|
||||||
|
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
return {
|
return {
|
||||||
// just lint the source dir
|
// just lint the source dir
|
||||||
source: {
|
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: {
|
files: {
|
||||||
src: '<%= lintThese %>'
|
src: '<%= lintThese %>'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue