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

textlint-plugin-typst-prose

v1.0.0

Published

A prose-oriented wrapper for textlint-plugin-typst

Readme

textlint-plugin-typst-prose

A prose-oriented wrapper for textlint-plugin-typst.

日本語版

textlint-plugin-typst-prose is a textlint plugin that post-processes the AST produced by textlint-plugin-typst and turns non-prose Typst commands into Comment nodes.

Customization

Issues and pull requests are welcome, but project-specific commands and templates may be easier to maintain in a fork.

Purpose

Typst documents often mix prose with #set, #show, #import, labels, footnotes, bibliographies, and custom functions for figures or tables.

These are valid parts of a Typst document, but prose-oriented textlint rules such as sentence-length may treat non-prose commands as prose and report unwanted errors.

This plugin is not a Typst parser. It is a small wrapper that makes Typst documents easier to proofread with textlint.

Installation

npm install --save-dev textlint textlint-plugin-typst-prose textlint-rule-sentence-length

Usage

Add it to .textlintrc.

{
  "plugins": {
    "typst-prose": true
  },
  "rules": {
    "sentence-length": true
  }
}

Suppressed Nodes

The plugin currently converts the following Typst elements into Comment nodes.

  • Labels
  • #footnote(...)
  • #bibliography(...)
  • #show
  • #set
  • #let
  • #import

Example

For example, suppose you have the following Typst document.

#import "@preview/tablex:0.0.8": tablex
#set text(lang: "ja")

This is prose. #footnote[This is a footnote.]

@fig:overview

This plugin does not rewrite the Typst source code. It only replaces non-prose nodes with Comment nodes in the AST that textlint reads.

When textlint rules read the original textlint-plugin-typst AST directly, they may treat Typst commands and footnotes as prose and report errors like this.

error  Line 1: Sentence is too long.
  #import "@preview/tablex:0.0.8": tablex

error  Line 4: Sentence is too long.
  #footnote[This is a footnote.]

With this plugin, the AST read by textlint is transformed as follows.

[
  { type: "Comment", raw: "#" },
  { type: "Comment", raw: '#import "@preview/tablex:0.0.8": tablex' },
  { type: "Comment", raw: "#" },
  { type: "Comment", raw: '#set text(lang: "ja")' },
  { type: "Str", value: "This is prose." },
  { type: "Comment", raw: "#" },
  { type: "Comment", raw: "#footnote[This is a footnote.]" },
  { type: "Comment", raw: "@fig:overview" }
]

As a result, prose-oriented rules such as sentence-length can focus on prose such as This is prose..

Why Comment Nodes?

Many prose-oriented textlint rules do not treat Comment nodes as prose.

This plugin does not rewrite Typst source code. It only post-processes the AST generated by textlint-plugin-typst.

Notes

This plugin is not a Typst parser. Typst AST generation is delegated to textlint-plugin-typst.

It also does not automatically detect every user-defined Typst function.