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

@digital-alchemy/eslint

v26.6.15

Published

Framework-correctness ESLint plugin for Digital-Alchemy TypeScript applications

Readme

@digital-alchemy/eslint

A framework-correctness ESLint plugin for Digital-Alchemy TypeScript applications. It enforces patterns and constraints specific to the DA runtime — service wiring, module boundaries, lifecycle ordering — that generic TypeScript linters cannot model.

Note: Rules that inspect type information require typed linting to be configured. Add parserOptions.projectService: true (or parserOptions.project) to your languageOptions block; without it, type-aware rules will be disabled or throw at load time.

Installation

yarn add --dev @digital-alchemy/eslint

Requires ESLint 9 or 10 and Node 20+.

Usage

Add the plugin to your flat config and extend the recommended config:

// eslint.config.mjs
import daEslint from "@digital-alchemy/eslint";

export default [
  // Spread recommended to get all default rule settings
  daEslint.configs.recommended,

  // Your own overrides below
  {
    languageOptions: {
      parserOptions: {
        // Required for type-aware rules
        projectService: true,
      },
    },
  },
];

Registering the plugin manually

If you prefer to enable only specific rules rather than the full recommended preset:

import daEslint from "@digital-alchemy/eslint";

export default [
  {
    plugins: { "digital-alchemy": daEslint },
    rules: {
      // "digital-alchemy/<rule-name>": "error",
    },
  },
];

Rules

🔧 Automatically fixable by the --fix CLI option.
💭 Requires type information.

| Name                            | Description | 🔧 | 💭 | | :-------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :- | :- | | module-declaration-merge | Require a LoadedModules declaration merge in the same file as CreateApplication/CreateLibrary, after the definition | | | | module-local-imports | Module files must source their services from local subfolders, not parent directories | | | | no-construction-side-effects | Disallow side-effectful statements at the root of a service factory. Construction is for wiring definitions; side effects belong in lifecycle hooks. | | | | no-empty-config-default | Disallow empty-string defaults in Digital Alchemy configuration entries | | | | no-service-class | Disallow class definitions in service files. | | | | no-service-external-mutation | Disallow mutating array methods called on bindings defined outside a service factory | | | | no-service-module-scope-state | .service.mts files must not declare module-scope mutable or derived state; static constants (primitive literals, static arrays/objects, new Map/Set([...literals]), static binary expressions, and hoistable computed expressions like [...].join(SEP)) are allowed at module scope per no-service-primitive-const. All runtime state must live in the service factory closure. Complements (does not duplicate) no-service-primitive-const (which targets static consts INSIDE the factory) and service-preamble-limit. | | | | no-sibling-service-import | .service.mts files must not import from sibling service files. Move shared constants/types to a contracts module and share logic through the framework (dependency injection). | | | | no-toplevel-config | Disallow top-level config access in DA service functions | | | | no-undeclared-module-dependency | Disallow a service referencing a module (via TServiceParams or config.) that its owner does not declare in depends/libraries. | | 💭 | | no-unnecessary-priority-init | Disallow a priorityInit entry that no sibling reads during construction (it orders nothing). | | 💭 | | no-unused-service-params | Disallow destructuring a TServiceParams member that is never used in a service. | 🔧 | | | priority-init-order | Disallow a priorityInit order where a producer wires after a consumer that reads it during construction. | | 💭 | | require-priority-init | Require a service to be listed in priorityInit when a sibling reads its API during construction. | | 💭 |

Typed linting

Many rules in this plugin inspect TypeScript type information. To enable them you must configure typed linting in your project:

// eslint.config.mjs
export default [
  {
    languageOptions: {
      parserOptions: {
        projectService: true,           // recommended (ESLint 9+)
        // OR: project: ["tsconfig.json"],  // explicit path form
      },
    },
  },
];

Without typed linting, type-aware rules will either be silently skipped or will produce a configuration error at startup.

Links

License

MIT