lintpage 0.5.1 → 0.5.3

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 CHANGED
@@ -55,6 +55,53 @@ In a pre-commit hook:
55
55
  npx lintpage localhost:3000 --quiet
56
56
  ```
57
57
 
58
+ ### Redirects to another site
59
+
60
+ If the page redirects to a different host, the audit would only see that
61
+ other site, so the CLI reports a CRITICAL `redirected-off-site` finding and
62
+ exits `1`. Adding or removing `www.`, switching from http to https, and a
63
+ different path on the same host do not count; a move to a subdomain or to
64
+ another country domain does. This holds whether the other site answers or
65
+ fails; a redirect the CLI refuses to follow at all, such as one to a private
66
+ address, is reported as `target-unreachable` instead. If the redirect is
67
+ intended, audit the final URL instead, or set the rule to `false` or a lower
68
+ severity in your config. With `--ai-only`, which does not fetch the page
69
+ itself, the same check runs on where the AI bot probes ended up.
70
+
71
+ ### Vercel deployments
72
+
73
+ A deployment behind Vercel Deployment Protection redirects to the Vercel login
74
+ page. Without access, LintPage reports that as `redirected-off-site` and
75
+ names the cause. To audit the deployment itself, create a Protection Bypass
76
+ for Automation secret in Vercel (Project Settings, Deployment Protection),
77
+ then pass it in the environment together with the deployment it is for:
78
+
79
+ ```bash
80
+ VERCEL_AUTOMATION_BYPASS_SECRET=... \
81
+ LINTPAGE_BYPASS_ORIGINS=https://my-app-git-feature-team.vercel.app \
82
+ npx lintpage https://my-app-git-feature-team.vercel.app
83
+ ```
84
+
85
+ The secret is read from the environment only, never from a flag, and is never
86
+ printed. It is sent as the `x-vercel-protection-bypass` header only when the
87
+ target is an https `*.vercel.app` URL whose origin is listed in
88
+ `LINTPAGE_BYPASS_ORIGINS` (comma or space separated), and then only to that
89
+ exact origin: not to any other site the audit contacts, and not along a
90
+ redirect to another host. `*.vercel.app` alone is not enough, because it
91
+ covers every Vercel customer's deployments. The CLI says on stderr whether
92
+ and where the secret was sent. Like any request header, it is visible to
93
+ tools that observe the process's HTTP traffic, such as an APM agent or a
94
+ TLS-intercepting proxy.
95
+
96
+ Vercel also sends `X-Robots-Tag: noindex` on its deployment URLs, so previews
97
+ stay out of search results. On an https `*.vercel.app` target, that noindex
98
+ finding is therefore reported as INFO rather than CRITICAL, and the output
99
+ says so. A `nofollow` in the same header, or a `noindex` in the page's robots
100
+ meta tag, keeps its severity. If your production site itself is served from
101
+ `*.vercel.app`, set a severity for `x-robots-tag` in your config (for example
102
+ `{ "enabled": true, "severity": "CRITICAL" }`) to restore the check; a
103
+ severity you configure is always used.
104
+
58
105
  ### Output
59
106
 
60
107
  ```
@@ -76,6 +123,32 @@ Exit codes:
76
123
  - `1` — critical issues found (or warnings with `--fail-on-warning`)
77
124
  - `2` — runtime error
78
125
 
126
+ ## Upgrading from 0.5.2
127
+
128
+ - `tracking` reports a page with no visible analytics as INFO instead of
129
+ WARNING: analytics loaded from a JavaScript bundle leave no trace in the
130
+ HTML, so their absence cannot be shown. An analytics host named in a
131
+ `preconnect`, `dns-prefetch` or `preload` link, or in the
132
+ Content-Security-Policy, now counts as found. With `--fail-on-warning`, a
133
+ page that failed only on this rule now passes; to keep the warning, set
134
+ `"tracking": { "enabled": true, "severity": "WARNING" }` under `rules` in
135
+ your config.
136
+ - `meta-render-blocking` no longer counts a `<script nomodule>`, such as the
137
+ Next.js polyfills, as blocking: browsers that run modules never load it.
138
+
139
+ ## Upgrading from 0.5.1
140
+
141
+ - A page that redirects to another host now fails with `redirected-off-site`
142
+ (exit `1`). Before, the audit quietly checked the other site. This includes
143
+ moves to a subdomain or another country domain; see above for how to accept
144
+ an intended redirect.
145
+ - On an https `*.vercel.app` target, Vercel's `X-Robots-Tag: noindex` is
146
+ reported as INFO instead of CRITICAL (see above).
147
+ - `--quiet` now applies to `--format github`, and with `--format github` a URL
148
+ whose audit cannot run gets an error annotation.
149
+ - GitHub annotation text no longer shows `%3A` and `%2C` in place of `:` and
150
+ `,`, and the job summary is new.
151
+
79
152
  ## Options
80
153
 
81
154
  | Flag | Description |
@@ -85,7 +158,7 @@ Exit codes:
85
158
  | `--fail-on-warning` | Exit 1 on warnings, not just criticals |
86
159
  | `--ai-only` | Run only the AI Visibility module (LP-050–LP-060) |
87
160
  | `--skip-ai` | Skip the AI Visibility module |
88
- | `--quiet` | Minimal output (counts only) |
161
+ | `--quiet` | Minimal output: counts only; with `--format github`, the verdict and notices plus critical annotations (and warnings with `--fail-on-warning`) |
89
162
 
90
163
  ## Rules
91
164
 
@@ -96,15 +169,16 @@ LintPage checks **60 rules** out of the box across five categories:
96
169
  | Rule | Severity | What it checks |
97
170
  | ------------------ | -------- | ----------------------------------------------------- |
98
171
  | `robots-noindex` | CRITICAL | Robots noindex/nofollow directives |
172
+ | `redirected-off-site` | CRITICAL | The page redirected to another host (CLI only) |
99
173
  | `ssl` | CRITICAL | Site served over HTTPS |
100
174
  | `x-robots-tag` | CRITICAL | X-Robots-Tag HTTP header noindex/nofollow |
101
175
  | `robots-txt-check` | WARNING | robots.txt presence and validity |
102
176
  | `sitemap-presence` | WARNING | sitemap.xml presence and validity |
103
- | `tracking` | WARNING | Google Analytics, GTM, or Facebook Pixel |
104
177
  | `mixed-content` | WARNING | HTTP resources loaded on HTTPS page |
105
178
  | `https-links` | WARNING | Internal links use HTTPS instead of HTTP |
106
179
  | `cors-policy` | WARNING | Overly permissive CORS configuration |
107
180
  | `security-headers` | INFO | CSP, HSTS, X-Content-Type-Options, Permissions-Policy |
181
+ | `tracking` | INFO | Analytics in scripts, resource hints or the CSP (bundled analytics cannot be seen) |
108
182
 
109
183
  ### SEO
110
184
 
@@ -155,7 +229,7 @@ LintPage checks **60 rules** out of the box across five categories:
155
229
  | Rule | Severity | What it checks |
156
230
  | ---------------------- | -------- | --------------------------------------------------------- |
157
231
  | `ttfb` | WARNING | Server response time (Time to First Byte) |
158
- | `meta-render-blocking` | WARNING | Render-blocking stylesheets and synchronous scripts |
232
+ | `meta-render-blocking` | WARNING | Render-blocking stylesheets and synchronous scripts (`nomodule` ones excepted) |
159
233
  | `lazy-load-lcp` | WARNING | Above-the-fold images not lazy-loaded |
160
234
  | `performance` | INFO | Lazy loading, inline styles, and script count |
161
235
  | `image-dimensions` | INFO | Images have explicit width/height to prevent layout shift |
@@ -235,7 +309,9 @@ Use the `github` format for native annotations:
235
309
  run: npx lintpage https://your-site.com --format github --fail-on-warning
236
310
  ```
237
311
 
238
- This outputs GitHub-compatible annotations that show up directly on your PR.
312
+ This outputs GitHub-compatible annotations that show up on your PR's checks. The verdict comes first, and each finding's annotation names the page it is about; a URL whose audit cannot run gets an error annotation. When `GITHUB_STEP_SUMMARY` is set, as it is in GitHub Actions, the CLI also adds a section per URL to the job summary: verdict, score, counts and the top findings.
313
+
314
+ For preview deployments, the [LintPage GitHub Action](https://github.com/marketplace/actions/lintpage-seo-check) runs this for you on each `deployment_status` event.
239
315
 
240
316
  ## License
241
317