-
-
Notifications
You must be signed in to change notification settings - Fork 8
Add support for outputReport, similar to eslint-loader #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This looks really nice, thanks! Would you mind adding a test for the new functionality and documenting it in the readme (copy paste from eslint-loader is fine! 😄)
Done. Not sure about the test, I only come to JS on occasion and am not terribly familiar with mocha.
FYI you can run the linter locally via npm run lint :)
But where's the fun in that when you can just test in production? ;)
😃
Amazing, thank you! I will review, merge and cut a new release tomorrow with this change 👍🏻
Thanks.
Added a small update, I'd forgotten to update the paths in the README from eslint to htmlhint. Only change in the last update...glad you hadn't merged yet. :)
And last update for now, added the ability to use -[name] in the filePath for the output. Otherwise you'll only get one output file, no matter how many files are linted.
If you could get this reviewed and merged fairly soon, that would be really useful.
Published as 1.1.0, thanks for the contribution! 👍
eslint-loader has support for outputReport, which is very useful. It also provides easy access to the filepath being examined by adding it to the message. With these you could use something like
module.exports.htmlhint.outputReport = {
filePath: '../htmlhint.rpt',
formatter: require(path.join(__dirname, 'mycustomformatter')),
};
in your webpack.config.js to use your own custom formatter to output the results to a file.