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

@accesslint/codemod

v0.1.2

Published

Codemod that migrates jest-axe projects to @accesslint/jest

Downloads

355

Readme

@accesslint/codemod

Automated migration from jest-axe, vitest-axe, and jasmine-axe to their AccessLint equivalents.

Quick start

# Migrate a jest-axe project
npx @accesslint/codemod jest-axe 'src/**/*.{test,spec}.{ts,tsx}'

# Migrate a vitest-axe project
npx @accesslint/codemod vitest-axe 'src/**/*.{test,spec}.{ts,tsx}'

# Auto-detect from package.json and run all applicable migrations
npx @accesslint/codemod auto 'src/**/*.{test,spec}.{ts,tsx}'

Recommended flow: run with --dry --print first to inspect the diff, then rerun without --dry.

npx @accesslint/codemod jest-axe --dry --print 'src/**/*.test.tsx'

Subcommands

| Subcommand | Source | Target | | ------------- | ------------------- | ---------------------- | | jest-axe | jest-axe | @accesslint/jest | | vitest-axe | vitest-axe | @accesslint/vitest | | jasmine-axe | jasmine-axe | @accesslint/jest | | auto | detected from package.json | per-plugin |

What's transformed

  1. Imports are rewritten to a side-effect import of the target package:

    - import { axe, toHaveNoViolations } from "jest-axe";
    + import "@accesslint/jest";

    Named, aliased, namespace, and CJS require() forms are all recognized.

  2. expect.extend(toHaveNoViolations) is removed — the side-effect import auto-registers the toBeAccessible() matcher. Identifier, object ({ toHaveNoViolations }), and spread ({ ...toHaveNoViolations }) forms are all handled.

  3. Two-statement pattern is collapsed:

    - const results = await axe(container);
    - expect(results).toHaveNoViolations();
    + expect(container).toBeAccessible();
  4. Inline pattern is collapsed:

    - expect(await axe(container)).toHaveNoViolations();
    + expect(container).toBeAccessible();

What's not transformed

  • configureAxe(...) globals — there is no per-project global in AccessLint; options are per-call. When configureAxe is imported, the codemod keeps the source import (for configureAxe only), adds the target side-effect import, and prepends a TODO comment reminding you to reapply those options via toBeAccessible({ disabledRules, failOn, ... }).

  • axe rule IDs → AccessLint rule IDsaxe(container, { rules: { "color-contrast": { enabled: false } } }) is collapsed to expect(container).toBeAccessible() with a TODO comment. AccessLint uses namespaced rule IDs (distinguishable/color-contrast); see the rule-ID mapping table in @accesslint/jest's README and reapply as toBeAccessible({ disabledRules: ["distinguishable/color-contrast"] }).

  • Builder-shaped axe plugins@axe-core/playwright, @axe-core/webdriverjs, @axe-core/puppeteer, and cypress-axe use a different API (new AxeBuilder({ page }).analyze() / cy.checkA11y(...)) and target @accesslint/playwright. These aren't supported in v0.1.

Flags

| Flag | Default | Meaning | | ------------------------ | ------------------- | ------- | | --dry | false | Don't write files; report what would change | | --print | false | Print transformed source to stdout (use with --dry) | | --parser=<name> | tsx | jscodeshift parser: babel, babylon, flow, ts, tsx | | --extensions=<csv> | js,jsx,ts,tsx | Comma-separated list of file extensions to process | | --verbose=<0\|1\|2> | 0 | Verbosity level |

After running

  1. Review any TODO(accesslint-codemod): comments — those are the spots that need a human decision (typically configureAxe options or per-call axe rule filters).
  2. Install the target package (the codemod doesn't touch your package.json):
    npm install --save-dev @accesslint/jest    # or @accesslint/vitest
    npm uninstall jest-axe                     # or vitest-axe / jasmine-axe
  3. Run your test script and confirm nothing regressed. Some assertions may produce different violation counts because AccessLint and axe are independent rule implementations — see @accesslint/jest's "What's different" notes.

License

MIT