Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandru Bereghici committed Sep 17, 2023
1 parent 596079f commit 4e38b2f
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
run: npm ci

- name: Validate
run: npm run --workspace=@standard-html/core prepublishOnly
run: npm run --workspace=standard-html prepublishOnly
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,35 @@

_Check if your HTML is compliant with W3C standards_

Still in development.
## 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>
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 22 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@standard-html/monorepo",
"name": "standard-html-monorepo",
"version": "0.0.0",
"private": true,
"description": "Monorepo for standard-html packages",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@standard-html/core",
"name": "standard-html",
"version": "0.0.1",
"description": "Check if your HTML is compliant with W3C standards",
"license": "MIT",
Expand Down

0 comments on commit 4e38b2f

Please sign in to comment.