htmllint / grunt-htmllint

HTML5 linting and validation.
ISC License
14 stars 17 forks source link

docs(options): remove erroneous "opts" argument #24

Closed Kristinita closed 6 years ago

Kristinita commented 6 years ago

1. Summary

In header.

2. Environment

3. Configuration

See example configuration in SashaHtmllint branch of my demo repository.

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>

4. Behavior before pull request

If 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:

Travis CI demonstration.

5. Behavior after pull request

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.

Travis CI demonstration.

Thanks.

mlochbaum commented 6 years ago

Thank you!