lintpage 0.1.0 → 0.1.1
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.
- package/README.md +171 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# lintpage
|
|
2
|
+
|
|
3
|
+
CLI tool that audits websites for SEO, accessibility, and performance issues. Catch broken meta tags, missing alt text, slow pages, and security problems before they hurt your rankings.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g lintpage
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or as a dev dependency:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -D lintpage
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
lintpage https://example.com
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The CLI automatically prepends `https://` if no protocol is provided:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
lintpage example.com
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Output
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
LintPage audit for https://example.com
|
|
33
|
+
Score: 85/100 Status: PASS
|
|
34
|
+
|
|
35
|
+
Pre-Launch 28/30 (93%)
|
|
36
|
+
SEO 32/35 (91%)
|
|
37
|
+
Accessibility 18/20 (90%)
|
|
38
|
+
Performance 14/15 (93%)
|
|
39
|
+
|
|
40
|
+
SEO
|
|
41
|
+
⚠ WARNING Title is too long (recommended: 50-60 characters)
|
|
42
|
+
Shorten your title to under 60 characters.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Exit codes:
|
|
46
|
+
- `0` — all checks pass
|
|
47
|
+
- `1` — critical issues found (or warnings with `--fail-on-warning`)
|
|
48
|
+
- `2` — runtime error
|
|
49
|
+
|
|
50
|
+
## Options
|
|
51
|
+
|
|
52
|
+
| Flag | Description |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `--format <format>` | Output format: `text` (default), `json`, `github` |
|
|
55
|
+
| `--fail-on-warning` | Exit 1 on warnings, not just criticals |
|
|
56
|
+
| `--quiet` | Minimal output (counts only) |
|
|
57
|
+
| `--report` | Send results to the LintPage dashboard |
|
|
58
|
+
| `--pro <key>` | Enable pro rules with a license key |
|
|
59
|
+
|
|
60
|
+
## Rules
|
|
61
|
+
|
|
62
|
+
LintPage checks **13 rules** out of the box across four categories:
|
|
63
|
+
|
|
64
|
+
### SEO
|
|
65
|
+
|
|
66
|
+
| Rule | Severity | What it checks |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `title` | CRITICAL | Title tag presence and length (30–60 chars) |
|
|
69
|
+
| `meta-description` | WARNING | Meta description presence and length |
|
|
70
|
+
| `heading-structure` | WARNING | Single H1, valid heading hierarchy |
|
|
71
|
+
| `canonical-url` | WARNING | Canonical URL tag |
|
|
72
|
+
| `robots-noindex` | INFO | Robots noindex directives |
|
|
73
|
+
| `og-title` | WARNING | OpenGraph title |
|
|
74
|
+
| `og-description` | WARNING | OpenGraph description |
|
|
75
|
+
| `og-image` | WARNING | OpenGraph image |
|
|
76
|
+
| `og-url` | WARNING | OpenGraph URL |
|
|
77
|
+
| `twitter-card` | WARNING | Twitter Card meta tags |
|
|
78
|
+
|
|
79
|
+
### Accessibility
|
|
80
|
+
|
|
81
|
+
| Rule | Severity | What it checks |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `html-lang` | CRITICAL | `lang` attribute on `<html>` |
|
|
84
|
+
| `viewport` | WARNING | Viewport meta tag |
|
|
85
|
+
|
|
86
|
+
### Pre-Launch
|
|
87
|
+
|
|
88
|
+
| Rule | Severity | What it checks |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| `favicon` | WARNING | Favicon presence |
|
|
91
|
+
|
|
92
|
+
### Pro Rules
|
|
93
|
+
|
|
94
|
+
With a license key (`--pro <key>` or `LINTPAGE_PRO_KEY` env var), you get **32 additional rules** including:
|
|
95
|
+
|
|
96
|
+
- **SSL & security** — HTTPS enforcement, security headers, mixed content detection
|
|
97
|
+
- **Advanced SEO** — Structured data validation, hreflang, duplicate meta detection, keyword stuffing
|
|
98
|
+
- **Accessibility** — ARIA labels, semantic HTML structure, image alt text
|
|
99
|
+
- **Performance** — TTFB measurement, render-blocking resources, lazy loading checks
|
|
100
|
+
- **Pre-launch** — robots.txt validation, sitemap checks, charset, tracking code detection
|
|
101
|
+
|
|
102
|
+
## Scoring
|
|
103
|
+
|
|
104
|
+
Each page gets a score out of 100, weighted by category:
|
|
105
|
+
|
|
106
|
+
| Category | Weight |
|
|
107
|
+
|---|---|
|
|
108
|
+
| Pre-Launch | 30 |
|
|
109
|
+
| SEO | 35 |
|
|
110
|
+
| Accessibility | 20 |
|
|
111
|
+
| Performance | 15 |
|
|
112
|
+
|
|
113
|
+
Severity deductions per issue: CRITICAL = −30%, WARNING = −5%, INFO = −1%.
|
|
114
|
+
|
|
115
|
+
## Configuration
|
|
116
|
+
|
|
117
|
+
Generate a config file:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
lintpage init
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This creates `.lintpagerc.json` in the current directory. You can also use `.lintpagerc` or `lintpage.config.json`.
|
|
124
|
+
|
|
125
|
+
### Disable a rule
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"rules": {
|
|
130
|
+
"og-image": false
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Override severity
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"rules": {
|
|
140
|
+
"meta-description": {
|
|
141
|
+
"enabled": true,
|
|
142
|
+
"severity": "CRITICAL"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## CI / GitHub Actions
|
|
149
|
+
|
|
150
|
+
Use the `github` format for native annotations:
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
- name: Lint page
|
|
154
|
+
run: npx lintpage https://your-site.com --format github --fail-on-warning
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
This outputs GitHub-compatible annotations that show up directly on your PR.
|
|
158
|
+
|
|
159
|
+
## Reporting
|
|
160
|
+
|
|
161
|
+
Send results to the LintPage dashboard:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
lintpage https://example.com --report --pro <key>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Requires `LINTPAGE_API_TOKEN` or a pro license key for authentication.
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT
|