SEO

seo/jsonld-valid

Every JSON-LD block is valid JSON with "@context" "https://schema.org" and a schema.org @type.

moderatestaticfe-seo-metadata

Why

A trailing comma or a missing quote makes the whole block invalid, and search engines drop it silently: no rich result, no error anywhere. Lighthouse lists structured data only as a manual check, so nothing in the usual tools catches it.

Fix

Generate JSON-LD from an object with JSON.stringify (escape < as < when you inject it into HTML), or validate hand-written blocks. Use "@context": "https://schema.org" and a type from Google's current search gallery, describe only what is visible on the page, and test with the Rich Results Test.

Examples

<!-- bad: trailing comma -->
<script type="application/ld+json">{ "@context": "https://schema.org", "@type": "Organization", "name": "Acme", }</script>
<!-- good -->
<script type="application/ld+json">{ "@context": "https://schema.org", "@type": "Organization", "name": "Acme", "url": "https://example.com" }</script>

Sources

Facts

Id
seo/jsonld-valid
Severity
moderate
Check
static checked in the source by audit
Applies to
html vue svelte astro jsx
Taught by the skill
fe-seo-metadata SEO and metadata
Since version
0.1.0

Rule file on GitHub

Read it in the terminal

npx github:dawidolko/frontend-skills explain seo/jsonld-valid