From 2ec9558ea4c6c16c5988e33368e22798fa488789 Mon Sep 17 00:00:00 2001 From: Maledong Date: Fri, 30 Aug 2019 14:25:42 +0800 Subject: [PATCH] fixture: hbs rules to allow template class name formation and some typos Now if you run with `npm run test` locally, we've got some errors of page checkings: 1. layouts/partials/footer.hbs: line 3, col 20, value must match the format: dash => This problem is caused by the special formation in {{...}}, because this is an hbs file, just like Angular or some template pages, we SHOULDN'T check its variable name, so ignore it by setting: id-class-ignore-regex": "{{.*?}}" in the '.htmllintrc'. 2. layouts/partials/footer.hbs: line 3, col 1, tag is not closed => Add spaces between some tag names. 3. layouts/partials/navigation.hbs: line 6, col 11, tag is not closed => Add spaces between some tag names. 4. layouts/partials/header.hbs: line 10, col 9, tag is not closed => Add spaces between some tag names. --- .htmllintrc | 1 + layouts/partials/footer.hbs | 2 +- layouts/partials/header.hbs | 2 +- layouts/partials/navigation.hbs | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.htmllintrc b/.htmllintrc index 0e1957f889f24..ce56fbac513a4 100644 --- a/.htmllintrc +++ b/.htmllintrc @@ -5,6 +5,7 @@ "attr-quote-style": false, "attr-req-value": false, "id-class-style": "dash", + "id-class-ignore-regex": "{{.*?}}", "img-req-alt": false, "indent-style": "spaces", "indent-width": 2, diff --git a/layouts/partials/footer.hbs b/layouts/partials/footer.hbs index b63bb0f751b54..73260e6228b33 100644 --- a/layouts/partials/footer.hbs +++ b/layouts/partials/footer.hbs @@ -1,6 +1,6 @@ {{site.scrollToTop}} - +