question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ember-template-lint won't lint if Doctype is added.

See original GitHub issue

If I add <!DOCTYPE html> in the start of file, it will give error error A block may only be used inside an HTML element or another block. .

My Config file is

module.exports = {
     rules: {
        'no-quoteless-attributes': true,
    }
  }

My handlebars template is

<!DOCTYPE html>
 <body>
    <div class="container-fluid">
      <div class="main-account-chooser">
        <div class="card">
          <div class="logo"></div>

          <div class="heading">
            <h4>Choose an account to continue</h4>
          </div>

          <div>
            <div title=username class="username">{{username}}</div>
            <a class="card-add-account" tabindex="{{tabindex}}" href="{{loginURL}}">
              <div class="icon-add-alt icon-sm"></div>
              <div class="info"> Add a new account </div>
            </a>
          </div>

        </div>
      </div>
    </div>
  </body>
</html>

If I remove !DOCTYPE, it will properly lint and give me warning that attribute is not wrapped in quotes.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
meetDevelopercommented, Jul 15, 2019

@CvX We use handlebars with sailsjs, and have doctype to make sure browser handle the page in standard mode.

Missing html opening tag was a typo.

0reactions
lockscommented, Aug 24, 2022

I just tried to reproduce in the current version and confirmed it is fixed!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Todo In Ember Template Lint
The new todo feature in the ember-template-lint addon provides a new option to the existing states for linting rules. With this new ...
Read more >
ember-template-lint-plugin-prettier - npm
It uses Prettier to lint your handlebars templates with ember-template-lint. The plugin defines a - single - rule. That rule will compare your ......
Read more >
Handling common HTML and CSS problems - MDN Web Docs
You should see a package called lint at the top of the list. Install this first (using the Install button), as other linters...
Read more >
Improving the Ember DX, Part 2: Changing Our Toolbelt
Specifically, we will be removing ember-cli-eslint , ember-cli-stylelint and ember-cli-template-lint while keeping our project completely ...
Read more >
More Templates - OSCHINA - 中文开源技术交流社区
Installation npm install --save-dev ember-template-lint yarn add --dev ... PuTTY for when stuff just won't work for me in Terminus Windows Subsystem for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found