mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
switch from eslint cli to gruntify-eslint
This commit is contained in:
parent
ed330d8b76
commit
e977e642d5
6 changed files with 20 additions and 14 deletions
|
@ -58,7 +58,10 @@ module.exports = function (grunt) {
|
|||
require('load-grunt-config')(grunt, {
|
||||
configPath: __dirname + '/tasks/config',
|
||||
init: true,
|
||||
config: config
|
||||
config: config,
|
||||
loadGruntTasks: {
|
||||
pattern: ['grunt-*', '@*/grunt-*', 'gruntify-*', '@*/gruntify-*']
|
||||
}
|
||||
});
|
||||
|
||||
// load task definitions
|
||||
|
|
|
@ -134,6 +134,7 @@
|
|||
"grunt-run": "spalger/grunt-run#master",
|
||||
"grunt-s3": "^0.2.0-alpha.3",
|
||||
"grunt-simple-mocha": "^0.4.0",
|
||||
"gruntify-eslint": "^1.0.0",
|
||||
"html-entities": "^1.1.1",
|
||||
"husky": "^0.8.1",
|
||||
"karma": "^0.13.3",
|
||||
|
|
12
tasks/config/eslint.js
Normal file
12
tasks/config/eslint.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
module.exports = function (grunt) {
|
||||
return {
|
||||
// just lint the source dir
|
||||
source: {
|
||||
files: {
|
||||
src: '<%= lintThese %>'
|
||||
}
|
||||
},
|
||||
|
||||
staged: {}
|
||||
};
|
||||
};
|
|
@ -12,16 +12,6 @@ module.exports = function (grunt) {
|
|||
},
|
||||
cmd: './bin/kibana',
|
||||
args: ['--dev', '--no-watch', '--logging.json=false']
|
||||
},
|
||||
|
||||
eslint: {
|
||||
cmd: root('node_modules/.bin/eslint'),
|
||||
args: ['Gruntfile.js', 'src/', 'tasks/', '--ignore-path', root('.eslintignore'), '--color']
|
||||
},
|
||||
|
||||
eslintStaged: {
|
||||
cmd: root('node_modules/.bin/eslint'),
|
||||
args: ['--ignore-path', root('.eslintignore'), '--color']
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ module.exports = function (grunt) {
|
|||
grunt.log.debug(files);
|
||||
|
||||
if (!_.size(files)) return;
|
||||
grunt.config.set('run.eslintStaged.args', _.union(grunt.config.get('run.eslintStaged.args'), files));
|
||||
grunt.task.run(['run:eslintStaged']);
|
||||
grunt.config.set('eslint.staged.files.src', files);
|
||||
grunt.task.run(['eslint:staged']);
|
||||
})
|
||||
.nodeify(this.async());
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ module.exports = function (grunt) {
|
|||
}
|
||||
|
||||
grunt.task.run(_.compact([
|
||||
'run:eslint',
|
||||
'eslint:source',
|
||||
'maybeStartKibana',
|
||||
'simplemocha:all',
|
||||
'karma:unit'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue