zemdomu 1.1.3 โ†’ 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +41 -45
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,35 +1,30 @@
1
- ZemDomu
1
+ # ZemDomu Core
2
2
 
3
- Semantic HTML linting engine for clean, accessible, and SEO-friendly markup. This package provides the shared core logic used by the ZemDomu VS Code extension and upcoming GitHub Action.
3
+ Semantic HTML linting engine for clean, accessible and SEO-friendly markup. This package provides the shared core logic used by the ZemDomu VS Code extension and upcoming GitHub Action.
4
4
 
5
+ ## ๐Ÿง  What is ZemDomu Core?
5
6
 
7
+ **ZemDomu** is a semantic-first linter that helps developers write better HTML and JSX by catching accessibility and structural issues. It parses `.html`, `.jsx` and `.tsx` files and exposes a simple `lint()` function that returns semantic violations.
6
8
 
7
- ๐Ÿง  What is ZemDomu Core?
8
-
9
- ZemDomu is a semantic-first linter that helps developers write better HTML and JSX by catching accessibility and structural issues. This package contains the framework-agnostic linting engine used by other tools in the ZemDomu ecosystem.
10
-
11
- It parses .html, .jsx, and .tsx content and exposes a simple lint() function that returns semantic violations.
12
-
13
- ๐Ÿš€ Installation
9
+ ## ๐Ÿš€ Installation
14
10
 
11
+ ```bash
15
12
  npm install zemdomu
16
13
  # or
17
14
  yarn add zemdomu
15
+ ```
18
16
 
19
- โœจ Features
20
-
21
- โœ… Lint semantic issues in HTML, JSX, and TSX
22
-
23
- ๐Ÿ“ฆ Works in Node.js, CI, or any JS runtime
24
-
25
- โš™๏ธ Extensible rule system
26
-
27
- ๐Ÿ“š Shared by extension and GitHub Action
17
+ ## โœจ Features
28
18
 
29
- ๐Ÿงช Simple API: lint(content, options)
19
+ - โœ… Lint semantic issues in HTML, JSX and TSX
20
+ - ๐Ÿ“ฆ Works in Node.js, CI or any JS runtime
21
+ - โš™๏ธ Extensible rule system
22
+ - ๐Ÿ“š Shared by the extension and GitHub Action
23
+ - ๐Ÿงช Simple API: `lint(content, options)`
30
24
 
31
- โš™๏ธ Usage Example
25
+ ## โš™๏ธ Usage Example
32
26
 
27
+ ```ts
33
28
  import { lint } from 'zemdomu';
34
29
 
35
30
  const html = '<img>';
@@ -48,20 +43,21 @@ console.log(results);
48
43
  // Custom rules can be supplied via the `customRules` option
49
44
  // const myRule = { name: 'demo', checkHtml: () => [] };
50
45
  // lint(html, { customRules: [myRule] });
46
+ ```
51
47
 
52
- ๐Ÿ“– API
48
+ ## ๐Ÿ“– API
53
49
 
54
- lint(content: string, options?: LinterOptions): LintResult[]
50
+ `lint(content: string, options?: LinterOptions): LintResult[]`
55
51
 
56
- Parameters:
52
+ **Parameters**
57
53
 
58
- content โ€” HTML, JSX, or TSX string input
54
+ - `content` โ€” HTML, JSX or TSX string input
55
+ - `options.rules` โ€” toggles for built-in rules
56
+ - `options.customRules` โ€” array of additional rules
59
57
 
60
- options.rules โ€” toggles for built-in rules
61
- options.customRules โ€” array of additional rules
62
-
63
- Example LinterOptions
58
+ **Example `LinterOptions`**
64
59
 
60
+ ```ts
65
61
  interface LinterOptions {
66
62
  rules: {
67
63
  requireAltText: boolean;
@@ -69,44 +65,44 @@ interface LinterOptions {
69
65
  };
70
66
  customRules?: Rule[];
71
67
  }
68
+ ```
72
69
 
73
- Example LintResult
70
+ **Example `LintResult`**
74
71
 
72
+ ```ts
75
73
  interface LintResult {
76
74
  line: number;
77
75
  column: number;
78
76
  message: string;
79
77
  rule: string;
80
78
  }
79
+ ```
81
80
 
82
- ๐Ÿ”— Related Tools
83
-
84
- ZemDomu VS Code Extension
81
+ ## ๐Ÿ”— Related Tools
85
82
 
86
- ZemDomu GitHub Action (coming soon)
83
+ - [ZemDomu VS Code Extension](../ZemDomu-Extension)
84
+ - ZemDomu GitHub Action (coming soon)
87
85
 
88
- ๐Ÿ›  Development
86
+ ## ๐Ÿ›  Development
89
87
 
88
+ ```bash
90
89
  git clone https://github.com/Zemdomu/ZemDomu-core.git
91
90
  cd ZemDomu-core
92
91
  npm install
93
92
  npm run build
93
+ ```
94
94
 
95
95
  Tests and coverage support coming soon.
96
96
 
97
- ๐Ÿค Contributing
98
-
99
- We welcome contributions! If you'd like to add rules, improve parsing, or integrate new consumers:
97
+ ## ๐Ÿค Contributing
100
98
 
101
- Fork this repo
99
+ We welcome contributions! If you'd like to add rules, improve parsing or integrate new consumers:
102
100
 
103
- Add your logic inside src/rules or src/linter.ts
101
+ 1. Fork this repo
102
+ 2. Add your logic inside `src/rules` or `src/linter.ts`
103
+ 3. Write or update tests (if applicable)
104
+ 4. Submit a pull request!
104
105
 
105
- Write or update tests (if applicable)
106
-
107
- Submit a pull request!
108
-
109
- ๐Ÿ“„ License
106
+ ## ๐Ÿ“„ License
110
107
 
111
108
  MIT ยฉ 2025 Zacharias Eryd Berlin
112
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zemdomu",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Hello",
5
5
  "main": "./out/index.js",
6
6
  "files": [