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

@arx-tools/config

v0.1.0

Published

The shared development tooling of the arx-tools libraries: the xo and prettier configuration, the tsconfig base and the test runner

Readme

@arx-tools/config

The shared development tooling of the arx-tools libraries: the xo and prettier configuration, the tsconfig base and the test runner. Every library uses the same conventions, so they live here instead of being copied into each repository.

It is development tooling only — none of it ends up in the published library code.

Contents

| export | what it is | |---|---| | @arx-tools/config | createXoConfig() and the shared rules of the xo configuration | | @arx-tools/config/prettier | the shared prettier options | | @arx-tools/config/tsconfig.base.json | the shared compilerOptions of the TypeScript projects | | arx-lib-test (bin) | the node:test runner: a single line per test with rounded durations, and it fails when no test ran |

Requirements

The tooling runs on the same Node.js version as the libraries' development environment: Node.js >= 22.18, because the sources and the tests run directly through type stripping.

Usage

The xo configuration

// xo.config.ts
import { createXoConfig } from '@arx-tools/config'

export default createXoConfig()

The factory assumes the folder layout of the libraries (src/, tests/, scripts/ with their own tsconfig.src.json, tsconfig.tests.json and tsconfig.scripts.json). Anything different can be passed in:

export default createXoConfig({
  rootDir: import.meta.dirname,
  sourceProject: './tsconfig.app.json',
  testProject: './tsconfig.spec.json',
  scriptProject: './tsconfig.tooling.json',
})

The shared rule set is exported as rules as well, so a repository can extend a copy of it instead of using the factory.

The prettier configuration

Prettier reads the package name from the prettier field of package.json:

{
  "prettier": "@arx-tools/config/prettier"
}

xo formats with prettier through its own parser, so it picks up the same options.

The TypeScript base

{
  "extends": "@arx-tools/config/tsconfig.base.json",
  "compilerOptions": {
    "rootDir": "./src",
    "outDir": "./dist"
  },
  "include": ["src/**/*"]
}

The base contains the target, the module settings, strict, and the flags which make the sources runnable without a build: allowImportingTsExtensions, rewriteRelativeImportExtensions, verbatimModuleSyntax and erasableSyntaxOnly.

The test runner

{
  "scripts": {
    "test": "arx-lib-test"
  }
}

The runner starts node --test with the tests/**/*.spec.ts pattern (any other pattern can be passed as the first argument), prints one line per test through its own reporter and fails when no test had been executed — node --test exits with zero for an empty glob, which makes a broken pattern look like a green suite.

The reporter is configured by two environment variables:

| variable | values | default | |---|---|---| | TEST_REPORT_FORMAT | flat (one line per test), tree (grouped under the suites) | flat | | TEST_REPORT_DURATION | auto (milliseconds below a second, seconds above it, four significant digits), ms, none | auto |

Development of this package

The package compiles its TypeScript sources into dist/ with tsc, so the consumers get JavaScript and declarations from node_modules (the type stripping of Node.js does not apply there).

| command | what it does | |---|---| | npm install | installs the dependencies | | npm run lint | check code against the pre-defined coding guidelines | | npm run typecheck | type checks the sources, the tests and the config | | npm test | builds nothing, runs the compiled runner against the tests | | npm run build | compiles dist/ and rewrites the .ts extensions in the declarations |

License

MIT