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

@glion/preset-lint-recommended

v0.16.0

Published

hl7v2-lint preset with recommended rules

Readme

@glion/preset-lint-recommended

Preset bundling the core (version-independent) HL7v2 lint rules.

What it does

This preset wires the core HL7v2 lint rules into a single unified plugin. One .use(...) call enables structural checks that apply to every HL7v2 message regardless of version or profile: segment header shape, message header presence, version range, and trailing field hygiene.

Install

npm install @glion/preset-lint-recommended

Use

import hl7v2PresetLintRecommended from "@glion/preset-lint-recommended";
import { hl7v2Parser } from "@glion/parser";
import { unified } from "unified";

const processor = unified().use(hl7v2Parser).use(hl7v2PresetLintRecommended);

const file = await processor.process(
  "MSH|^~\\&|SENDER||RECEIVER||20250601120000||ADT^A01|MSG00001|P|2.5"
);

for (const message of file.messages) {
  console.log(`${message.ruleId}: ${message.reason}`);
}

API

unified().use(hl7v2PresetLintRecommended)

Default export is a Preset (unified's { plugins: [...] } shape). No options — to configure individual rules, compose them directly from their own packages instead of using the preset.

What's bundled

The preset applies these rules in order. Three are configured at error severity; no-trailing-empty-field uses its default severity.

| Plugin | Purpose | | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | | @glion/lint-segment-header-length | Flags segment headers that are not exactly three characters. | | @glion/lint-required-message-header | Flags messages whose first segment is not MSH. | | @glion/lint-message-version | Flags MSH-12 values outside the configured semver range. | | @glion/lint-no-trailing-empty-field | Flags segments that end with one or more empty fields (stray trailing \|). |

The companion @glion/preset-lint-profile-recommended covers profile-driven, version-specific lint rules; use both together for comprehensive validation.

Part of Glion

@glion/preset-lint-recommended is part of Glion, the application framework for HL7v2. See the Glion README for the full package catalog and architecture.