From 92320385b5da6c878803ddceb3adad0cc7968c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Fri, 2 Feb 2024 15:44:03 +0100 Subject: [PATCH] docs: update description --- README.md | 20 +++++++++----------- package.json | 2 +- src/HTMLValidatorCommand.ts | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b09657e..e51a95a 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@

html-w3c-validator

- CLI for validating multiple html pages using validator.w3.org. -

- + CLI for validating HTML pages using validator.w3.org.

@@ -22,11 +20,11 @@ ## 📜 About -**html-w3c-validator** is a CLI tool to validate multiple html pages using [validator.w3.org](https://validator.w3.org/). +**html-w3c-validator** is a CLI tool to validate HTML pages using [validator.w3.org](https://validator.w3.org/). You might use a JavaScript framework or simply use HTML but **you should always validate your production HTML** and this validation should be part of your CI/CD pipeline (tests, linting, etc.). -### Why should I validate my HTML pages? +### Why is HTML page validation important? Quote from [https://validator.w3.org/docs/help.html#why-validate](https://validator.w3.org/docs/help.html#why-validate): @@ -52,21 +50,21 @@ npm install --save-dev html-w3c-validator start-server-and-test ### `package.json` -```json +```jsonc { "scripts": { // Command to start the server serving your HTML pages (e.g: using vercel/serve) "start": "serve \"./build\"", // Command to validate your HTML pages - "test:html-w3c-validator": "start-server-and-test \"start\" \"http://127.0.0.1:3000\" \"html-w3c-validator\"" - } + "test:html-w3c-validator": "start-server-and-test \"start\" \"http://127.0.0.1:3000\" \"html-w3c-validator\"", + }, } ``` ### `.html-w3c-validatorrc.json` -```json +```jsonc { "$schema": "https://raw.githubusercontent.com/theoludwig/html-w3c-validator/main/schema/html-w3c-validatorrc-schema.json", @@ -77,7 +75,7 @@ npm install --save-dev html-w3c-validator start-server-and-test "files": ["./index.html", "./about.html"], // Specify the severities of the validator messages to report. (default: ["warning", "error"]) - "severities": ["info", "warning", "error"] + "severities": ["info", "warning", "error"], } ``` @@ -101,7 +99,7 @@ See the [./example](./example) folder for practical usage. ### Options ```text ---current-working-directory The current working directory (default: process.cwd()). +--current-working-directory The current working directory (default: `process.cwd()`). -V, --version Output the version number. -h, --help Display help for command. ``` diff --git a/package.json b/package.json index b291b7f..b068f8a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "html-w3c-validator", "version": "0.0.0-development", - "description": "CLI for validating multiple html pages using validator.w3.org.", + "description": "CLI for validating HTML pages using validator.w3.org.", "public": true, "types": "module", "type": "module", diff --git a/src/HTMLValidatorCommand.ts b/src/HTMLValidatorCommand.ts index 0d87818..0a32af0 100644 --- a/src/HTMLValidatorCommand.ts +++ b/src/HTMLValidatorCommand.ts @@ -48,7 +48,7 @@ const printResults = (results: Result[]): void => { export class HTMLValidatorCommand extends Command { static override usage = { description: - "CLI for validating multiple html pages using .", + "CLI for validating HTML pages using .", } public currentWorkingDirectory = Option.String(