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

@crescware/eslint-plugin-crescware-const-no-upper-snake-case

v0.0.3

Published

ESLint plugin that forbids `const` declaration bindings named in SCREAMING_SNAKE_CASE. lowerCamelCase is preferred and PascalCase is allowed for components and classes. It ships as a standard ESLint plugin and is dogfooded on its own source through [oxlin

Readme

@crescware/eslint-plugin-crescware-const-no-upper-snake-case

ESLint plugin that forbids const declaration bindings named in SCREAMING_SNAKE_CASE. lowerCamelCase is preferred and PascalCase is allowed for components and classes. It ships as a standard ESLint plugin and is dogfooded on its own source through oxlint's JS plugin support.

Rule: crescware-const-no-upper-snake-case/const-no-upper-snake-case

Only SCREAMING_SNAKE_CASE binding names are rejected. A name is rejected when every character is an uppercase letter, a digit or an underscore and the first character is an uppercase letter — that is, it contains no lowercase letter at all:

  • Rejected: NAME_MAX_LENGTH, ERROR_KEY, ANSWER, URL, and a single uppercase letter such as X.
  • Allowed: lowerCamelCase (fooBar, getUrl) and PascalCase (Foo, BazComponent, QuxContext) for components and classes.
  • A leading underscore (_keys, _) is allowed: the first character is not an uppercase letter.
  • Any name containing at least one lowercase letter is allowed, because the rejection pattern admits no lowercase character.

What is checked

Every binding introduced by a const declaration, including:

  • simple bindings (const fooBar = 1)
  • object / array destructuring (const { a } = o, const [b] = arr)
  • renamed destructuring — the local binding, not the source key (const { id: userId } = o checks userId)
  • nested patterns, default values and rest elements
  • for (const … of …) / for (const … in …) loop variables

What is not checked

let / var, function parameters, object property keys, type names, type parameters and import bindings are out of scope.

const fooBar = 1; // ok (lowerCamelCase)
const Foo = 1; // ok (PascalCase, e.g. a component or class)
const ANSWER = 1; // error: must not be SCREAMING_SNAKE_CASE
const { ERROR_KEY } = resp; // error on `ERROR_KEY`
let LOOSE_NAME = 1; // ok (not a const)

Usage (as a published ESLint plugin)

pnpm add -D @crescware/eslint-plugin-crescware-const-no-upper-snake-case
import constNoUpperSnakeCase from "@crescware/eslint-plugin-crescware-const-no-upper-snake-case";

export default [
  {
    plugins: {
      "crescware-const-no-upper-snake-case": constNoUpperSnakeCase,
    },
    rules: {
      "crescware-const-no-upper-snake-case/const-no-upper-snake-case": "error",
    },
  },
];

Stack

How it is built and verified

  • src/index.ts is the plugin: a self-contained ESLint rule with no runtime dependencies. pnpm build compiles it to dist/ (with .d.ts) via tsconfig.build.json.
  • .oxlintrc.json loads the plugin through jsPlugins: ["./src/index.ts"] and enables the rule on this repository's own source, so the plugin lints itself (no const in src/ is SCREAMING_SNAKE_CASE).
  • fixtures/*.ts are lint fixtures: ng-*.ts must produce diagnostics and ok-*.ts must produce none. They are linted with the separate fixtures/oxlintrc.fixtures.json (all built-in categories off, only this rule on) and are excluded from the main lint via ignorePatterns.
  • fixtures/integration.test.ts runs oxlint over the fixtures once and asserts the exact per-file diagnostic messages.

Setup

mise install
corepack enable
pnpm install

Scripts

| Command | Description | | -------------------- | ---------------------------------------------- | | pnpm build | Compile src/index.ts to dist/ with .d.ts | | pnpm check | Run all checks (types, lint, knip, test) | | pnpm check:types | Type check | | pnpm check:lint | Lint (incl. self-dogfooding) and format check | | pnpm check:knip | Unused files/exports check | | pnpm exec:fixtures | Print raw fixture diagnostics as JSON | | pnpm test | Run the fixture integration test | | pnpm format | Fix lint and format |