gpt4 book ai didi

javascript - 咕噜声 : how to generate jshint output as HTML

转载 作者:搜寻专家 更新时间:2023-10-31 22:21:26 26 4
gpt4 key购买 nike

我正在尝试使用 grunt 运行 jshint。这可行,但现在我希望输出为 HTML。这是我的 grunt 文件

module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
jshint: {
all: ['Gruntfile.js', 'src/*.js']
, options: {
//reporter: 'jslint'
reporter:'checkstyle'
, reporterOutput: 'jshint.html'
}
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
};

运行此 grunt taks,输出为 XML。有什么建议可以将它变成输出 HTML 的东西吗?

非常感谢

最佳答案

您需要编写自定义报告程序。查看有关编写自定义报告程序的 jshint 文档:http://jshint.com/docs/reporters/然后你可以指定记者的路径:

options: {
reporter: '/path/to/custom/html/reporter',
reporterOutput: 'jshint.html'
}

关于javascript - 咕噜声 : how to generate jshint output as HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17477788/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com