diff --git a/docs/.stylelintrc.json b/docs/.stylelintrc.json index 7aa74906fcb..bbaca142688 100644 --- a/docs/.stylelintrc.json +++ b/docs/.stylelintrc.json @@ -24,6 +24,14 @@ "selector-class-pattern": null, "value-keyword-case": null }, + "overrides": [ + { + "files": [ + "**/*.html" + ], + "extends": ["stylelint-config-html/html", "stylelint-config-standard"] + } + ], "ignoreFiles": [ "_site/**" ] diff --git a/docs/package.json b/docs/package.json index 151a5a16006..2d8e321fec7 100644 --- a/docs/package.json +++ b/docs/package.json @@ -16,7 +16,7 @@ "build:eleventy": "npx @11ty/eleventy", "start": "npm-run-all build:sass --parallel watch:*", "build": "npm-run-all build:sass build:eleventy images", - "lint:scss": "stylelint \"**/*.scss\"", + "lint:scss": "stylelint \"**/*.{scss,html}\"", "lint:fix:scss": "npm run lint:scss -- --fix" }, "devDependencies": { @@ -41,9 +41,12 @@ "markdown-it-container": "^3.0.0", "netlify-cli": "^10.3.1", "npm-run-all": "^4.1.5", + "postcss-html": "^1.5.0", "rimraf": "^3.0.2", "sass": "^1.52.1", "stylelint": "^14.13.0", + "stylelint-config-html": "^1.1.0", + "stylelint-config-standard": "^29.0.0", "stylelint-config-standard-scss": "^5.0.0" }, "engines": { diff --git a/docs/src/_includes/layouts/base.html b/docs/src/_includes/layouts/base.html index db69d33b5de..300ba745719 100644 --- a/docs/src/_includes/layouts/base.html +++ b/docs/src/_includes/layouts/base.html @@ -24,7 +24,7 @@ {{ page_title }} - + @@ -76,7 +76,6 @@ @@ -104,7 +129,7 @@

ESLint Report

9 problems (5 errors, 4 warnings) - + 1:10 Error 'addOne' is defined but never used. @@ -113,7 +138,7 @@

ESLint Report

- + 2:9 Error Use the isNaN function to compare with NaN. @@ -122,7 +147,7 @@

ESLint Report

- + 3:16 Error Unexpected space before unary operator '++'. @@ -131,7 +156,7 @@

ESLint Report

- + 3:20 Warning Missing semicolon. @@ -140,7 +165,7 @@

ESLint Report

- + 4:12 Warning Unnecessary 'else' after 'return'. @@ -149,7 +174,7 @@

ESLint Report

- + 5:1 Warning Expected indentation of 8 spaces but found 6. @@ -158,7 +183,7 @@

ESLint Report

- + 5:7 Error Function 'addOne' expected a return value. @@ -167,7 +192,7 @@

ESLint Report

- + 5:13 Warning Missing semicolon. @@ -176,7 +201,7 @@

ESLint Report

- + 7:2 Error Unnecessary semicolon. diff --git a/lib/cli-engine/formatters/html.js b/lib/cli-engine/formatters/html.js index 6e40bbe16b7..1aa66fcefac 100644 --- a/lib/cli-engine/formatters/html.js +++ b/lib/cli-engine/formatters/html.js @@ -43,85 +43,110 @@ function pageTemplate(it) { @@ -214,7 +239,7 @@ function messageTemplate(it) { } = it; return ` - + ${lineNumber}:${columnNumber} ${severityName} ${encodeHTML(message)}