I have set up Gulp to ESLint the javascript in my HTML script tags with the following code.
const eslint = require('gulp-eslint');
gulp.task('process-js', () => {
const scripts = processInline();
return gulp.src(['src/*.html'])
.pipe(errorNotifier())
.pipe(scripts.extract('script'))
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError())
.pipe(scripts.restore())
.pipe(gulp.dest('dist'))
});
The linter works well, but seems to give me line numbers that does not correspond to my HTML files, but the line numbers of the extracted javascript from the script tags, which I never see.
How do I get the line numbers of the HTML file? Or can I lint my HTML script javascript in a better way?