Skip to content

Feature Request: being able to pass it a list of url's #9

@branneman

Description

@branneman

Since a lot of people are using grunt to validate source code —and not built files, such as minified javascript— it would be nice if grunt-htmlhint would also support linting url's, instead of only files.

Say you're using a local node.js server with a template engine like Swig, and you'd want to check your html before the build, so you can fail the build if necessary. Like refusing to optimize require.js with r.js if there are JSHint errors. frntndr is an example of such a project. Who has the full html for a single page inside one file nowadays?

For this to work, I'd be nice if grunt-htmlhint could validate url's as well. Since running htmlhint over swig files will naturally fail, there needs to be a way of validating combined html from several template files. Like the grunt-htmllint-http plugin does. But ideally you wouldn't want another grunt plugin for that if you ask me.

I could see an example config like this:

htmlhint: {
  options: {
    'tag-pair': true
  },
  dist: {
    src: [
      'http://localhost/',
      'http://localhost/articles.html'
    ]
  }
}

But this is of course only a proposal, maybe a different way of specifying url's makes more sense?

Edit: I could help with the development of this feature, if you agree this would be a nice addition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions