Skip to content
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

Rules are not working #24

Open
gaboratorium opened this issue Jul 19, 2016 · 2 comments
Open

Rules are not working #24

gaboratorium opened this issue Jul 19, 2016 · 2 comments

Comments

@gaboratorium
Copy link

gaboratorium commented Jul 19, 2016

I have tried 3 different ways of declaring custom rules, neither of them worked.
Referencing a .htmlhintrc file:

gulp.task('htmllint', function() {
        return gulp.src(settings.app.base + "/index.html")
            .pipe(htmllint('.htmlhintrc', htmllintReporter));
    });

Referencing a htmlhintrc.json file:

gulp.task('htmllint', function() {
        return gulp.src(settings.app.base + "/index.html")
            .pipe(htmllint('htmlhintrc.json', htmllintReporter));
    });

And referencing the object inline:

gulp.task('htmllint', function() {
        return gulp.src(settings.app.base + "/index.html")
            .pipe(htmllint({ "tag-pair": true, "title-require": false }, htmllintReporter));
    });

Other than that I always get the following error: (E015) line ending does not match format: lf
and I have found no documentation for this at https://github.com/yaniswang/HTMLHint/wiki/Rules

@olore
Copy link

olore commented Sep 23, 2016

Referencing the htmlhtintrc file like this works for me:

gulp.task('htmlhint', function () {
  return gulp.src([
    '*.html',
    'app/**/*.html',
    'ext/**/*.html'
  ])
    .pipe(htmlhint({
      htmlhintrc: './.htmlhintrc'
    }))
    .pipe(htmlhint.reporter())
    .pipe(htmlhint.failReporter({ suppress: true }));
});

@fifn2
Copy link

fifn2 commented Feb 14, 2019

@gaboratorium I doubt this is still relevant in 2019, but your not using htmlHint.reporter() and you need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants