I want to use eslint with VS2017 and follow these instructions :
ESlint seems to works when I call it from the "Task Runner Explorer" VS2017 Window via Gulp (see below), but I want have warnings and errors into the "Error List" VS2017 Window.
How do this ?
I've undertood that this was normally set by default, why i'm quite embarrassed.
My Gulp code :
gulp.task('eslint', function (done) {
gulp.src([
paths.root + 'js/**/*.js',
paths.root + 'Modules/**/js/*.js',
'!' + paths.root + 'js/plugins/**/*.js',
'!' + paths.root + 'js/lib/**/*.js'
])
.pipe(eslint('./.eslintrc.json'))
.pipe(eslint.result(function (result) {
if (result.warningCount > 0 || result.errorCount > 0) {
console.log('ESLint error: ' + result.filePath + ' : ');
console.log(result.messages);
}
}))
.pipe(eslint.failOnError())
.on('end', done)
});
What I get from the task runner explorer window :
ESLint error: [FILEPATH] :
[ { ruleId: 'no-unused-vars',
severity: 2,
message: '\'file\' is defined but never used.',
line: 54,
column: 32,
nodeType: 'Identifier',
source: ' removedfile: function (file) {' } ]
Process terminated with code 0.
Thank you for the help.
Samuel