【问题标题】:JsHint Error in GruntfileGruntfile 中的 JsHint 错误
【发布时间】:2019-01-29 13:19:47
【问题描述】:

更新 VS2017 后出现以下错误:“警告:“路径”参数必须是字符串类型。接收到类型对象。使用 --force 继续。” 我的 Gruntfile 的 jshint 部分:

jshint: {
            files: ['temp/*.js',
                'Scripts/common.js',
                'Scripts/renderImage.js',
                'Scripts/classifEditPreamble.js',
                'Scripts/displayPreamble.js',
                'Scripts/editionFilter.js',
                'Scripts/newRegistration.js',
                'Scripts/adminPanel.js'],
            options: {
                '-W069': false,
                'esnext': true
            }
        }

【问题讨论】:

  • require('load-grunt-tasks')(grunt, {pattern: ['grunt-*', '@*/grunt-*', "!grunt-contrib-jshint"]}); 试试这个。请仔细检查您的文件路径。

标签: jshint gruntfile


【解决方案1】:

在选项中添加一行(reporterOutput)解决了这个问题。错误信息具有误导性!

options: {
            '-W069': false,
            'reporterOutput': "",
            'esnext': true
        }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-25
    • 2019-08-02
    • 2013-09-07
    相关资源
    最近更新 更多