From 6785800aae597249ffc6da8d7c2bcff4af3f7e09 Mon Sep 17 00:00:00 2001 From: Joe Biellik Date: Sun, 26 Jul 2020 17:34:43 +0100 Subject: [PATCH] Improve linting --- .eslintrc.json | 5 +++-- .pug-lintrc.json | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .pug-lintrc.json diff --git a/.eslintrc.json b/.eslintrc.json index 43838d0..13a5d36 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,7 @@ { "env": { - "node": true + "node": true, + "es6": true }, "parserOptions": { "ecmaVersion": 11 @@ -20,6 +21,6 @@ "no-useless-backreference": ["error"], "quotes": ["error", "single", "avoid-escape"], "semi": ["error", "always"], - "space-before-function-paren": ["error", {"anonymous": "never", "named": "never", "asyncArrow": "always"}] + "space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }] } } diff --git a/.pug-lintrc.json b/.pug-lintrc.json new file mode 100644 index 0000000..2850a51 --- /dev/null +++ b/.pug-lintrc.json @@ -0,0 +1,30 @@ +{ + "disallowAttributeInterpolation": true, + "disallowAttributeTemplateString": "all", + "disallowBlockExpansion": true, + "disallowClassAttributeWithStaticValue": true, + "disallowClassLiteralsBeforeIdLiterals": true, + "disallowDuplicateAttributes": true, + "disallowHtmlText": true, + "disallowIdAttributeWithStaticValue": true, + "disallowLegacyMixinCall": true, + "disallowMultipleLineBreaks": true, + "disallowSpacesInsideAttributeBrackets": true, + "disallowStringConcatenation": "aggressive", + "disallowTemplateString": "all", + "disallowTrailingSpaces": true, + "requireClassLiteralsBeforeAttributes": true, + "requireIdLiteralsBeforeAttributes": true, + "requireLineFeedAtFileEnd": true, + "requireLowerCaseAttributes": true, + "requireLowerCaseTags": true, + "requireSpaceAfterCodeOperator": true, + "requireStrictEqualityOperators": true, + "validateAttributeQuoteMarks": "'", + "validateAttributeSeparator": " ", + "validateDivTags": true, + "validateIndentation": 2, + "validateLineBreaks": "LF", + "validateSelfClosingTags": true, + "validateTemplateString": true +}