VSCode, and Gulp Eslint: one of them is lying?

Good day to all.

Please help to understand how the Linter in Visual Studio Code and Gulp. So, there is a project, collect Gulp'ohms for the project task:
var gulp = require("gulp");
var eslint = require("gulp-eslint");

gulp.task("lint", function () {
 return gulp.src("js/**")
 .pipe(eslint({ fix: true }))
.pipe(eslint.the format())
.pipe(eslint.failAfterError());
});

At the root, as expected, lies .eslintrc in which it is set, for example, the following rule:
{
 "extends": "eslint:recommended",

 "parser": "babel-eslint",

 "env": { "browser": true, "jquery": true, "es6": true },

 "parserOptions": {
 "ecmaVersion": 6,
 "sourceType": "module",
 "ecmaFeatures": { "classes": true }
},

 "rules": { "strict": [2, "function"] }
}

Write some JS file function without "use strict":
function dummy() {
console.log("dummy");
}

In VSCode this function is underscored eslint'th error: the function for Use of "use strict". However, if I do gulp lint, then no error is thrown.

So the question is: who of these guys is lying, and who is right?
July 2nd 19 at 13:31
1 answer
July 2nd 19 at 13:33
Solution

Use the function for of "use strict"

It is rather warn and not error. Therefore, in the console nothing appears. Just VSCode konsolka shows warning eslint, and the terminal - apparently not. Besides, you probably have the code compiles, because, in contrast to error, warn is not a reason to interrupt listing.
No, there is error: is highlighted in red, and "2" in eslintrc - this is an error, not a warning. When checking gulp'ω warnings also rained, but on other things; error if ignored. The idea was that he simply fixes on the fly, but in the resulting file the "use strict" is also not featured. - Rebeka.Kunze commented on July 2nd 19 at 13:36
he pixil need gulp.dest to do in the halfpipe with lint. - willow.Hand commented on July 2nd 19 at 13:39
: So it turns out that the Linter something to check errors on the fly rules, but fixes these go nowhere? In fact, he complains only on those things that can't be corrected, other errors remain. Clearly, thanks ) - Rebeka.Kunze commented on July 2nd 19 at 13:42

Find more questions by tags Gulp.jsJavaScriptVisual Studio Code