npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lvgl/mdx-lint

v0.2.1

Published

Three-pass MDX linter used by LVGL CI: @mdx-js/mdx syntax check, allowlist check against the Fumadocs + @lvgl/mdx-components registry, and per-component prop validation driven by zod schemas generated from the component source.

Downloads

718

Readme

@lvgl/mdx-lint

MDX linter for LVGL documentation contributors. Catches malformed MDX, unknown components, and misused component props before the Fumadocs build pipeline runs — so broken MDX never lands on the docs site.

This package is LVGL-specific. It ships with the component registry and prop schemas hardcoded to match the LVGL docs stack.

Writing docs

The canonical reference for LVGL's MDX writing conventions — which components exist, what props they take, and how to structure a page — lives at:

https://lvgl.io/docs/open/contributing/writing_docs

Every lint error links back to that guide.

Install

npm install --save-dev @lvgl/mdx-lint
# or
pnpm add -D @lvgl/mdx-lint

Run

npx lvgl-mdx-lint "docs/**/*.{md,mdx}"

CI (GitHub Actions):

- run: npx --yes @lvgl/mdx-lint@latest "docs/**/*.{md,mdx}" --reporter github

--reporter github emits ::error file=…,line=…:: annotations so failures surface inline on the PR diff.

CLI options

lvgl-mdx-lint [globs...] [--reporter <pretty|github|json>] [--fail-on-warning]

Exit codes: 0 clean · 1 lint errors · 2 usage error.

What it checks

The linter runs three passes. Later passes are skipped on files that already have a fatal error from an earlier pass.

  1. Syntax — unclosed JSX, malformed expressions, bad frontmatter, invalid GFM tables. Powered by @mdx-js/mdx.

  2. Allowlist<Foo> tags and import statements are checked against the registry baked into this package. Anything that isn't a known component or an allowed module fails.

  3. Props — for every known component, the linter validates:

    • Every attribute name is declared on the component.
    • Every required attribute is present.
    • Every literal-valued attribute matches the declared type (string, number, boolean, enum, array of primitives).

    Expression-valued attributes (foo={someVar}) count as "present" but their values are not inspected — the linter can't evaluate arbitrary JS.

Rule codes

| Rule | What it means | How to fix | |---|---|---| | mdx-lint:syntax | The MDX parser rejected your file. | Fix the formatting or syntax error at the reported line. | | mdx-lint:unknown-component | A <JsxTag> in your file isn't a registered component. | Check the spelling. If you expected it to exist, run pnpm update @lvgl/mdx-lint. | | mdx-lint:disallowed-import | An import statement points at a module the linter doesn't allow. | Use components via @lvgl/mdx-components rather than importing from source. | | mdx-lint:unknown-prop | A prop on a JSX tag isn't declared on that component. | Check the spelling, or run pnpm update @lvgl/mdx-lint if you expect a newer prop. | | mdx-lint:missing-required-prop | A required prop is missing from a JSX tag. | Add the prop. If the requirement is new to you, run pnpm update @lvgl/mdx-lint. | | mdx-lint:invalid-prop-value | A prop value doesn't match the declared type. | See the writing guide for the correct values. |

Every error message includes a link to the writing guide: https://lvgl.io/docs/open/contributing/writing_docs

Inspecting the registry

To see what components and module prefixes the installed version allows:

npx lvgl-mdx-print-allowlist
# or JSON
npx lvgl-mdx-print-allowlist --format json

License

MIT