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

@cutting/oxc-config

v1.2.0

Published

Cutting Oxlint and oxfmt configuration

Downloads

567

Readme

Cutting oxc-config

This package holds the shared Oxlint and oxfmt configs that other packages use.

Installation

pnpm add @cutting/oxc-config -D

The package installs oxlint, oxfmt, eslint-plugin-simple-import-sort, eslint-plugin-sonarjs and eslint-plugin-storybook.

Configuration

Create one oxlint.config.ts in the root of the repo:

import config from '@cutting/oxc-config/react';

export default config;

Use @cutting/oxc-config/eslint instead for a repo with no React code.

Create one oxfmt.config.ts in the root of the repo:

import config from '@cutting/oxc-config/oxfmt';

export default config;

Oxlint and oxfmt find these files from any folder below the root, so a package needs no config file of its own.

package.json scripts

Add a lint script to each package:

  "scripts": {
    "lint": "oxlint ./src --fix && oxfmt ./src"
  }

Format on save in VS Code

Install the Oxc extension (oxc.oxc-vscode), and add this to .vscode/settings.json:

{
  "editor.defaultFormatter": "oxc.oxc-vscode",
  "editor.formatOnSave": true
}

Disable comments

Oxlint obeys oxlint-disable and eslint-disable comments:

// oxlint-disable-next-line typescript/no-explicit-any

/* oxlint-disable eqeqeq */

What rules are applied

@cutting/oxc-config/eslint

  • The @typescript-eslint/recommended rules.
  • curly, eqeqeq, no-var, prefer-const and no-unused-vars (names that start with _ are ignored).
  • typescript/explicit-module-boundary-types and typescript/consistent-type-imports.
  • import/first, import/newline-after-import and import/no-duplicates.
  • simple-import-sort/imports and simple-import-sort/exports, through the eslint-plugin-simple-import-sort JS plugin.
  • no-empty.
  • cutting/no-comments: no comments. Lint directives (eslint-, oxlint-), @ts-expect-error, $ExpectType, $ExpectError, GraphQL tags, triple-slash references and a shebang line are allowed.
  • The eslint-plugin-sonarjs recommended rules, without sonarjs/max-lines, sonarjs/no-nested-template-literals and sonarjs/no-commented-code. Oxlint's built-in rule replaces each sonar rule that has one. These rules are off in *.test.ts, *.test.tsx, *.stories.tsx and __mocks__.
  • max-lines: a *.ts or *.tsx file has at most 200 lines, not counting blank lines and comments. The rule is off in *.test.ts, *.test.tsx, *.stories.tsx and __mocks__.
  • cutting/no-browser-storage: no localStorage or sessionStorage in *.test.ts and *.test.tsx.
  • cutting/no-vi-mock: no vi.mock or vi.doMock in *.test.ts and *.test.tsx. vi.fn, vi.spyOn and vi.stubGlobal are allowed.
  • cutting/no-test-code-imports: no import from @storybook/*, storybook/*, msw, vitest or @testing-library/* in a *.ts or *.tsx file. The rule is off in *.test.ts, *.test.tsx, *.stories.tsx, __mocks__ and .storybook.

The cutting/* rules come from a JS plugin inside this package.

@cutting/oxc-config/react

All the rules above, plus:

  • The eslint-plugin-react recommended rules.
  • The eslint-plugin-jsx-a11y recommended rules.
  • react/rules-of-hooks and react/exhaustive-deps, which also checks useIsomorphicLayoutEffect.
  • cutting/no-react-namespace and cutting/no-react-namespace-types: no React. in values or in types. Use named imports.
  • typescript/no-restricted-imports: no JSX import from react.
  • The eslint-plugin-storybook recommended rules, in *.stories.* and *.story.* files and in .storybook/main.*.

@cutting/oxc-config/oxfmt

  • printWidth: 120, singleQuote: true, semi: true, tabWidth: 2, trailingComma: 'all', sortPackageJson: false.
  • *.js files use printWidth: 140 and trailingComma: 'none'.

Extending

Spread the config in the root oxlint.config.ts, and add to each field:

import config from '@cutting/oxc-config/react';

export default {
  ...config,
  ignorePatterns: [...config.ignorePatterns, 'tools'],
  plugins: [...config.plugins, 'vitest'],
  rules: {
    ...config.rules,
    'no-var': 'off',
  },
  overrides: [
    ...config.overrides,
    {
      files: ['**/*.test.ts'],
      rules: {
        'typescript/no-explicit-any': 'off',
      },
    },
  ],
};

Spread each field you change. A field without the spread replaces the shared value.

Extend oxfmt.config.ts the same way:

import config from '@cutting/oxc-config/oxfmt';

export default {
  ...config,
  printWidth: 100,
};