0
如何使用WebPack配置獲取ESLint HTML報告。我目前使用eslint-loader
。 ESLint格式化程序中的documentation不清楚。ESLint使用webpack的HTML報告
在webpack.config.js
中,我添加了以下作爲預加載器。
preLoaders: [{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loaders: ['eslint-loader'],
}],
它完美地完成了這項工作,並在運行WebPack時在控制檯中顯示錯誤。我還在WebPack中添加了
eslint: {
formatter: require("eslint/lib/formatters/html"),
},
它在控制檯本身中引發HTML輸出字符串。我想把它保存爲HTML文件。任何指針都會有幫助。