pugjs / pug-lint

An unopinionated and configurable linter and style checker for Pug
ISC License
228 stars 51 forks source link

Preventing nested content in self-closing elements #134

Open pixelastic opened 7 years ago

pixelastic commented 7 years ago

The following (invalid) code will pass through pug-lint:

body
  input(type="text") Foo

But, if passed through pug will yield the following error:

input is a self closing element: <input/> but contains nested content.

I think that everything that would make pug fail to compile should be caught by pug-lint, when possible.

I'm using pug-lint v2.4.0 on Ubuntu (installed through yarn).