Node.js gulp eslint在控制台上未显示任何错误

Node.js gulp eslint在控制台上未显示任何错误,node.js,gulp,Node.js,Gulp,我定义了这样一个吞咽任务 var lint = require('gulp-eslint'); gulp.task('lint', function() { return gulp.src(config.paths.js) .pipe(lint({config: 'eslint.config.json'})) .pipe(lint.format()); }); $ = jQuery = require('jquery'); var App = cons

我定义了这样一个吞咽任务

var lint = require('gulp-eslint');
gulp.task('lint', function() {
    return gulp.src(config.paths.js)
        .pipe(lint({config: 'eslint.config.json'}))
        .pipe(lint.format());
});
$ = jQuery = require('jquery');

var App = console.log('hello from browserfiy');

module.exports = App;
还有像这样的js文件

var lint = require('gulp-eslint');
gulp.task('lint', function() {
    return gulp.src(config.paths.js)
        .pipe(lint({config: 'eslint.config.json'}))
        .pipe(lint.format());
});
$ = jQuery = require('jquery');

var App = console.log('hello from browserfiy');

module.exports = App;
当我通过添加
var test=15编辑我的js文件时;var检验=20并保存,lint在控制台上并没有显示任何错误消息,尽管从控制台我可以看到lint像这样被踢了进来

Starting 'lint'...
Finished 'lint'  29ms
eslint.config.json

{
  "ecmaFeatures": {
    "jsx": true
  },
  "env": {
    "browser": true,
    "node": true,
    "jquery": true
  },
  "rules": {
    "quotes": 0,
    "no-trailing-spaces": 0,
    "eol-last": 0,
    "no-unused-vars": 0,
    "no-underscore-dangle": 0,
    "no-alert": 0,
    "no-lone-blocks": 0
  },
  "globals": {
    jQuery: true,
    $: true
  }
}

如注释中所示,您可以将其添加到eslint配置中,以便在重新声明变量时出错:

 "no-redeclare": 1

我看不出您的设置有任何问题。。。您是否偶然禁用了
无需重新声明
规则?可能会将其作为答案发布,并将其标记为已解决:)谢谢您也参加了pluralsight课程?;-)我也有同样的问题。谢谢分享!我也在做同样的课程,有同样的问题,谢谢!