seo-lint-next 0.1.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 914c840: Avoid false positives for links whose accessible text is provided by dynamic JSX expressions.
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 7c9eba8: Add rules 11-25 covering language, viewport, client pages, hreflang, anchor text, 404/error boundaries, OG image dimensions, robots access to Next.js assets, breadcrumbs, next/head usage, SSR-disabled dynamic imports, next/font, redirect chains, and article dates.
14
+
15
+ ### Patch Changes
16
+
17
+ - 9e63161: Reduce false positives from real Next.js App Router projects by treating dynamic metadata as present, skipping private/noindex pages for public SEO rules, recognizing JSON-LD wrapper components, and avoiding metadata asset `X-Robots-Tag` warnings.
18
+
3
19
  ## 0.1.0
4
20
 
5
21
  - Initial v1 package with the ESLint plugin, standalone CLI, and 10 App Router SEO rules.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  <img alt="license" src="https://img.shields.io/badge/license-MIT-111827">
16
16
  </p>
17
17
 
18
- `seo-lint-next` catches the metadata bugs that usually escape to production: missing titles, broken canonicals, unsafe `metadataBase`, bad OG tags, accidental `noindex`, sitemap gaps, invalid JSON-LD, heading skips, and weak image alt text.
18
+ `seo-lint-next` catches the SEO bugs that usually escape to production: missing titles, broken canonicals, unsafe `metadataBase`, bad OG tags, accidental `noindex`, sitemap gaps, invalid JSON-LD, heading skips, weak image alt text, broken locale metadata, bad App Router patterns, and crawl-blocking config.
19
19
 
20
20
  ## Install
21
21
 
@@ -23,6 +23,8 @@
23
23
  npm install --save-dev seo-lint-next
24
24
  ```
25
25
 
26
+ Requires Node.js 18.18+ and works with ESLint 8.57+ or 9.
27
+
26
28
  ## ESLint
27
29
 
28
30
  ```js
@@ -43,18 +45,33 @@ npx seo-lint-next --strict
43
45
 
44
46
  ## Rule Set
45
47
 
46
- | Rule | Default | Catches |
47
- | ----------------------------- | ------: | ------------------------------------------------------------------- |
48
- | `no-missing-title` | error | Missing, empty, duplicate, or weak dynamic titles |
49
- | `no-missing-metadata-base` | error | Missing, localhost, or non-HTTPS root `metadataBase` |
50
- | `no-missing-description` | warn | Missing, duplicate, too short, or too long descriptions |
51
- | `no-missing-canonical` | error | Missing canonicals and hardcoded dynamic-route canonicals |
52
- | `no-missing-og-tags` | warn | Missing Open Graph/Twitter tags and weak image dimensions |
53
- | `no-broken-heading-hierarchy` | warn | Missing/multiple H1s and skipped heading levels |
54
- | `no-img-missing-alt` | warn | Raw `<img>`, missing/generic alt text, layout-shifting images |
55
- | `no-accidental-noindex` | error | Public `noindex`, blanket robots blocks, risky X-Robots headers |
56
- | `no-missing-sitemap` | warn | Missing sitemap, relative URLs, missing robots sitemap reference |
57
- | `no-invalid-json-ld` | error | Invalid JSON-LD syntax, bad context, missing required schema fields |
48
+ | Rule | Default | Catches |
49
+ | ---------------------------------------- | ------: | ---------------------------------------------------------------- |
50
+ | `no-missing-title` | error | Missing, empty, duplicate, or weak dynamic titles |
51
+ | `no-missing-metadata-base` | error | Missing, localhost, or non-HTTPS root `metadataBase` |
52
+ | `no-missing-description` | warn | Missing, duplicate, too short, or too long descriptions |
53
+ | `no-missing-canonical` | error | Missing canonicals and hardcoded dynamic-route canonicals |
54
+ | `no-missing-og-tags` | warn | Missing Open Graph/Twitter tags |
55
+ | `no-broken-heading-hierarchy` | warn | Missing/multiple H1s and skipped heading levels |
56
+ | `no-img-missing-alt` | warn | Raw `<img>`, missing/generic alt text, layout-shifting images |
57
+ | `no-accidental-noindex` | error | Public `noindex`, blanket robots blocks, risky X-Robots headers |
58
+ | `no-missing-sitemap` | warn | Missing sitemap, relative URLs, missing robots sitemap reference |
59
+ | `no-invalid-json-ld` | error | Invalid JSON-LD syntax, bad context, missing schema fields |
60
+ | `no-missing-lang-attribute` | error | Missing or invalid `<html lang>` in App Router layouts |
61
+ | `no-missing-viewport` | error | Broken viewport overrides and disabled user zoom |
62
+ | `no-use-client-on-page` | warn | Top-level client pages and ignored metadata exports |
63
+ | `no-missing-hreflang` | warn | Locale routes without `alternates.languages` |
64
+ | `no-generic-anchor-text` | warn | Empty or generic link text |
65
+ | `no-missing-404-page` | warn | Missing or weak `app/not-found.tsx` recovery pages |
66
+ | `no-missing-og-image-dimensions` | warn | OG images without width, height, or alt text |
67
+ | `no-blocking-next-static` | error | Robots rules blocking `/_next/` rendering assets |
68
+ | `no-missing-breadcrumb-schema` | warn | Deep pages without `BreadcrumbList` JSON-LD |
69
+ | `no-title-in-pages-head` | error | `next/head` metadata patterns inside `app/` |
70
+ | `no-dynamic-import-ssr-false-on-content` | warn | `dynamic(..., { ssr: false })` around likely content |
71
+ | `no-missing-next-font` | warn | External Google Fonts instead of `next/font` |
72
+ | `no-redirect-chain-in-next-config` | warn | Redirect chains and temporary redirects in `next.config` |
73
+ | `no-missing-article-dates` | warn | Article pages missing freshness metadata |
74
+ | `no-missing-error-boundary-metadata` | warn | Missing error boundaries or weak recovery links |
58
75
 
59
76
  ## Configuration
60
77
 
@@ -82,4 +99,4 @@ export default [
82
99
  - run: npm run check
83
100
  ```
84
101
 
85
- The package has no production bundle impact. It statically inspects App Router source files, JSX, `metadata` exports, `generateMetadata()` returns, `app/robots.ts`, `public/robots.txt`, and `app/sitemap.ts`.
102
+ The package has no production bundle impact. It statically inspects App Router source files, JSX, `metadata` exports, `generateMetadata()` returns, `next.config.*`, `app/robots.ts`, `public/robots.txt`, and `app/sitemap.ts`.