rrdelaney / jadelint

:dragon: A linter for the Jade templating language
https://rrdelaney.github.io/jadelint
MIT License
6 stars 1 forks source link

Should OnlyHTMLDoctype should accept "html" and "HTML" doctypes? #4

Closed pdehaan closed 9 years ago

pdehaan commented 9 years ago

I ran the jadelint@0.2.3 linter against my views/*.jade folder and it failed because I had my doctype set to "HTML" instead of "html" (see /src/rules/OnlyHTMLDoctype.coffee). Not sure if it should be case insensitive or not.

➜  idea-town git:(master) ✗ cat views/layout.jade
doctype HTML
html(lang="en")
  include includes/header

  body
    block content

    include includes/footer
    script(type="text/javascript" src="scripts/main.min.js")

➜  idea-town git:(master) ✗ jadelint views/*.jade

views/layout.jade
  ✖  line 1  Only HTML doctypes are allowed

✖  1 warning
➜  idea-town git:(master) ✗ cat views/layout.jade
doctype html
html(lang="en")
  include includes/header

  body
    block content

    include includes/footer
    script(type="text/javascript" src="scripts/main.min.js")

➜  idea-town git:(master) ✗ jadelint views/*.jade

✔ No problems found!
rrdelaney commented 9 years ago

Done and published