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

yamllint-ts

v0.1.0

Published

A TypeScript YAML linter with full feature parity to yamllint (Python)

Readme

yamllint-ts

CI Coverage Status TypeScript

A TypeScript implementation of yamllint, the YAML linter.

Installation

npm install yamllint-ts

Usage

# Lint a file
yamllint-ts myfile.yaml

# Lint with a config file
yamllint-ts -c .yamllint.yaml myfile.yaml

# Lint with inline config
yamllint-ts -d '{extends: relaxed, rules: {line-length: {max: 120}}}' myfile.yaml

Configuration

yamllint-ts uses the same configuration format as Python yamllint. See the yamllint documentation for details.

Compatibility with Python yamllint

yamllint-ts aims for full feature parity with Python yamllint. All linting rules are implemented and produce identical results for valid YAML files.

Parser Differences

yamllint-ts uses the yaml package for YAML parsing, while Python yamllint uses PyYAML. These parsers have different error reporting behavior for malformed YAML:

| Aspect | Python yamllint (PyYAML) | yamllint-ts (eemeli/yaml) | |--------|--------------------------|---------------------------| | Error messages | PyYAML-style messages (e.g., "could not find expected ':'") | yaml-style messages (e.g., "Implicit keys need to be on a single line") | | Error positions | May differ by 1-2 lines | May differ by 1-2 lines | | Error detection | Detects some errors earlier/later in parsing | Detects some errors earlier/later in parsing |

Example

For this YAML with no_space_after:value on line 3 (missing space after colon):

---
good: value
no_space_after:value
extra_spaces:   value
  • Python yamllint: 4:1 error syntax error: could not find expected ':'
  • yamllint-ts: 3:1 error syntax error: Implicit keys need to be on a single line

Both correctly identify the file as invalid, but with different error messages and line numbers.

Impact

  • For valid YAML: 100% parity - all rules produce identical results
  • For malformed YAML: Syntax errors are detected but may have different messages/positions
  • Comparison testing: 144/160 tests match (90%), with all differences being syntax error reporting

Why Not Use PyYAML?

Porting PyYAML's scanner (~2000 lines of Python) to TypeScript would be a significant undertaking. The current approach provides full linting functionality while leveraging a well-maintained, modern YAML parser. The trade-off of slightly different syntax error messages for invalid YAML was deemed acceptable.

Rules

All yamllint rules are supported:

  • anchors
  • braces
  • brackets
  • colons
  • commas
  • comments
  • comments-indentation
  • document-end
  • document-start
  • empty-lines
  • empty-values
  • float-values
  • hyphens
  • indentation
  • key-duplicates
  • key-ordering
  • line-length
  • new-line-at-end-of-file
  • new-lines
  • octal-values
  • quoted-strings
  • trailing-spaces
  • truthy

License

GPL-3.0 (same as Python yamllint)

Attribution

This project is a TypeScript port of yamllint by Adrien Vergé, licensed under GPL-3.0. The original Python implementation provided the design, rules, and test cases that this port is based on.