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

purslint

v0.1.0

Published

A linter for PureScript

Readme

PureLint

A PureScript linter inspired by hlint, providing suggestions for cleaner, more idiomatic PureScript code.

Features

PureLint currently ships with 81 lint rules, covering common PureScript refactors and simplifications.

For a complete list, see lib/purslint/src/Purslint/Rules/.

Installation

npm (recommended)

npm install -g purslint

# CLI
purelint --help

Prerequisites

Building

# Install dependencies
spago install

# Build CLI
purs compile --codegen corefn 'lib/**/*.purs' 'bin/purslint-cli/**/*.purs' '.spago/**/*.purs'
psgo output/*/corefn.json
cp output/Main/Main.go main_cli.go
go build -o purelint main_cli.go

# Build LSP
purs compile --codegen corefn 'lib/**/*.purs' 'bin/purslint-lsp/**/*.purs' '.spago/**/*.purs'
psgo output/*/corefn.json
cp output/Main/Main.go main_lsp.go
go build -o purelint-lsp main_lsp.go

# Build and run tests
purs compile --codegen corefn 'lib/**/*.purs' 'test/**/*.purs' '.spago/**/*.purs'
psgo output/*/corefn.json
cp output/Test.Main/Test_Main.go test_main.go
go build -o test-runner test_main.go
./test-runner

Usage

CLI

# Lint a single file
./purelint src/Main.purs

# Lint multiple files
./purelint src/*.purs

# Lint with config file (optional)
./purelint --config purelint.json src/*.purs

LSP (Language Server Protocol)

The LSP binary (purelint-lsp) provides IDE integration. It communicates via stdio using the standard LSP protocol.

Zed Editor

A Zed extension is available in the zed-extension/ directory. To install:

  1. Open Zed
  2. Go to Extensions (Cmd+Shift+X)
  3. Click "Install Dev Extension"
  4. Select the zed-extension/ directory

The extension will automatically use the purelint-lsp binary.

Neovim (nvim-lspconfig)

After building purelint-lsp (see build steps below), you can configure Neovim like this:

require("lspconfig").purelint = {
  default_config = {
    cmd = { "/path/to/purelint-lsp" },
    filetypes = { "purescript" },
    root_dir = require("lspconfig.util").root_pattern(".git", "spago.yaml", "package.json"),
  },
}

require("lspconfig").purelint.setup({})

If you prefer to run the bundled JS directly:

cmd = { "node", "/path/to/dist/purelint-lsp.js" }

Configuration

Create a purelint.json file in your project root:

{
  "disabledRules": ["LetToWhere", "EtaReduce"]
}

Architecture

PureLint is written in PureScript and compiled to Go using psgo (purescript-native). This allows:

  • Full access to the PureScript CST parser (purescript-language-cst-parser)
  • Native binary performance
  • Easy distribution without runtime dependencies

Project Structure

purelint/
├── lib/purslint/src/       # Core library
│   └── Purslint/
│       ├── Rules/          # Lint rules
│       ├── Runner.purs     # Rule runner
│       ├── Types.purs      # Core types
│       └── Imports.purs    # Import checking
├── bin/
│   ├── purslint-cli/       # CLI application
│   └── purslint-lsp/       # LSP server
├── test/                   # Test suite
└── zed-extension/          # Zed editor extension

Development

Publishing to npm

Publishing is handled by GitHub Actions. Add an NPM_TOKEN secret with an automation or granular token that has publish rights for purslint, then create a GitHub Release to trigger the workflow. You can also run it manually via the workflow dispatch.

Adding a New Rule

  1. Create a new file in lib/purslint/src/Purslint/Rules/
  2. Implement the rule using the CST traversal API
  3. Export the rule from Purslint.Rules
  4. Add tests in test/Test/Main.purs
  5. Rebuild and test

Key Dependencies

  • purescript-language-cst-parser - PureScript CST parser
  • purescript-lsp - LSP protocol implementation (Go FFI)

License

MIT