Closed Kristinita closed 6 years ago
In header.
See example configuration in SashaHtmllint branch of my demo repository.
SashaHtmllintDebugging.html:
SashaHtmllintDebugging.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <div class="SashaClass">Sasha Goddess!</div> <div class="SashaClass">Sasha Goddess!</div> <div class="SashaClass">Sasha Goddess!</div> <div class="SashaClass">Sasha Goddess!</div> <div class="SashaClass">Sasha Goddess!</div> <div class="SashaClass">Sasha Goddess!</div> <div class="SashaClass">Sasha Goddess!</div> <div class="SashaClass">Sasha Goddess!</div> </body> </html>
If Gruntfile.js:
Gruntfile.js
module.exports = function (grunt) { grunt.initConfig({ htmllint: { options: { force: true, opts: { maxerr: 5 } }, src: [ 'SashaHtmllintDebugging.html' ] } }); grunt.loadNpmTasks('grunt-htmllint'); grunt.registerTask('default', ['htmllint']); };
9 errors, maxerr: 5 doesn't accept:
maxerr: 5
Travis CI demonstration.
Else:
module.exports = function (grunt) { grunt.initConfig({ htmllint: { options: { force: true, maxerr: 5 }, src: [ 'SashaHtmllintDebugging.html' ] } }); grunt.loadNpmTasks('grunt-htmllint'); grunt.registerTask('default', ['htmllint']); };
5 errors as in options.
Thanks.
Thank you!
1. Summary
In header.
2. Environment
3. Configuration
See example configuration in SashaHtmllint branch of my demo repository.
SashaHtmllintDebugging.html
:4. Behavior before pull request
If
Gruntfile.js
:9 errors,
maxerr: 5
doesn't accept:Travis CI demonstration.
5. Behavior after pull request
Else:
5 errors as in options.
Travis CI demonstration.
Thanks.