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

@formancy/code-style

v0.14.0

Published

The ESLint rules and the Prettier format the formancy repositories share: one module, which each repository calls with its own paths.

Readme

@formancy/code-style

The lint rules and the format the formancy repositories share: an ESLint configuration and Prettier's options, in one JavaScript module that each repository calls with its own paths. It names no path of any repository, so the repositories hold one set of rules and one style without a copy each.

Use

npm install --save-dev @formancy/code-style eslint prettier typescript

ESLint, Prettier and TypeScript are peers: a repository installs them at versions of its own, inside the ranges the manifest declares, each of which starts at the version this package's suite runs.

It declares no Node of its own. The Node it runs on is ESLint's, which its eslint peer and its @eslint/js dependency both declare as ^20.19.0 || ^22.13.0 || >=24 (ESLint 10.13.0 and @eslint/js 10.0.1, read on 2026-10-30). That is the floor that binds, and it is above the >=22.12.0 formancy.ai's own manifest declares.

eslint.config.mjs:

import { eslintConfig } from '@formancy/code-style'

export default eslintConfig({
  root: import.meta.dirname,
  project: ['./packages/*/tsconfig.json'],
  ignoreFiles: ['.gitignore'],
  tests: ['**/*.test.{ts,tsx,mjs}'],
})

prettier.config.mjs:

export { prettierConfig as default } from '@formancy/code-style'

FILES is the glob a repository's format and format:check scripts hand Prettier, and EXTENSIONS its extensions: TypeScript's and JavaScript's, so that neither tool reads a file the other does not.

The paths a repository passes

The module's doc comment on eslintConfig is the reference; in short:

  • root, absolute: the repository, which the other paths are read from.
  • project: the tsconfigs that type its TypeScript, by glob.
  • ignoreFiles: its .gitignore files, each read for its own directory, as git reads it. Build output, coverage and test results are ignored besides.
  • tests: its test files, which alone are relaxed.
  • untyped: TypeScript no tsconfig holds, linted without types.
  • browser: files that drive a page, which know the page's globals.
  • react: its React components and hooks.

The first four are required, and a call without one is refused where the configuration is made: without tests, every file would be relaxed. A repository's own exception, such as a generated file, is written where it calls this, as a globalIgnores beside it and a line in .prettierignore, and never in the module.

What it holds

  • The rules are @eslint/js's recommended set and typescript-eslint's type-aware one, every rule an error or off: a warning is a finding nobody has to fix. A name may go unused only if it begins with _. A disable comment says why after --, and one that disables nothing is an error. A typographic space is allowed in a string, a template and JSX text, and refused between two tokens. Where react points, a hook may not run under a condition or miss a dependency.
  • A test is relaxed for the no-unsafe-* rules, no-explicit-any and unbound-method alone, and held to everything else. require-await is off in every file: an async function with no await is how a synchronous implementation of an async contract keeps its throws as rejections, and no-floating-promises and no-misused-promises still catch a forgotten await.
  • The format is Prettier's defaults but five: no semicolons, single quotes, trailing commas wherever they are allowed, 160 columns, and code embedded in a string left as written, because an Angular template's whitespace renders.

It ships no type declarations: a repository imports it from a JavaScript configuration file. A configuration TypeScript checks with checkJs has nothing of it typed. Measured with TypeScript 6.0.3 on 2026-10-30: under noImplicitAny, which strict sets, the import is error TS7016, a module with no declaration file; without it, every name imported is any, so a misspelled option passes the check, and a required path left out is refused only when ESLint loads the configuration.

Where it comes from

The module and its test, src/code-style.mjs and src/code-style.test.mjs, were written for Formancy Health (formancy.ai-health 0017) and moved here. Formancy Health and Formancy Data, which carried copies, pin this package exactly from 0.12.0, so a rule is changed here and reaches them by a release. The test is this package's suite. It lints a repository of its own, written to the system's temporary directory, and holds that each rule runs at error on the kind of file it is for and that each path does what it says. It does not hold that what a rule reports is a defect.

pnpm test:e2e:install installs the packed tarball with its dependencies and peers into a project outside the workspace, and lints and formats a file there with it.