Skip to content

Commit

Permalink
v0.0.2 - add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandru Bereghici committed Sep 17, 2023
1 parent 4e38b2f commit 3bf824d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Standard HTML - W3C Validator

_Check if your HTML is compliant with W3C standards_

## Setup

Install package:

```shell
$ npm install --save-dev standard-html
```

## Usage

Usage example using `@testing-library/react` and `vitest`

```
import { expect, test } from "vitest";
import { render } from "@testing-library/react";
import { validateMarkup } from "standard-html";
import App from "./App";
test("markup is valid", async () => {
const { container } = render(<App />);
const [violations, summary] = await validateMarkup(container);
expect(violations).toEqual([]);
expect(summary.length).toEqual(0);
});
```

Error output example:

<img src=https://raw.githubusercontent.com/abereghici/standard-html/main/example.png width=800 alt=screenshot>
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "standard-html",
"version": "0.0.1",
"version": "0.0.2",
"description": "Check if your HTML is compliant with W3C standards",
"license": "MIT",
"author": "Alexandru Bereghici <[email protected]>",
Expand Down

0 comments on commit 3bf824d

Please sign in to comment.