⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

migrate-oxlint-config

@cloudflare⭐ 110 stars

Migrate an existing JavaScript or TypeScript project to @cloudflare/oxlint-config with a passing baseline and one reviewable commit per rule.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐ 110 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

@cloudflare/oxlint-config

Shared Oxlint config for JavaScript and TypeScript projects. It builds on @nkzw/oxlint-config and adds rules for type safety, promise handling, and type-only imports.

Usage

Use Node.js 22.18 or later on the 22.x line, or Node.js 24 or later. Node.js 22.18 is the first 22.x release that can load oxlint.config.ts without extra flags.

Standalone Oxlint

Install the preset with Oxlint and tsrs, its type-aware backend.

npm install -D @cloudflare/oxlint-config oxlint@^1.94.0 tsrs@^7.1.0-beta.tsrs2

Create oxlint.config.ts in the project root:

import cloudflare from '@cloudflare/oxlint-config';
import { defineConfig } from 'oxlint';

export default defineConfig({
  extends: [cloudflare],
  env: cloudflare.env,
  ignorePatterns: cloudflare.ignorePatterns,
});

Run oxlint . locally and in CI.

Vite+

In a project that uses [email protected] or later, install the preset. Vite+ supplies Oxlint and its type-aware backend.

vp add -D @cloudflare/oxlint-config

Import the Vite+ entry in the project's root vite.config.ts.

import cloudflare from '@cloudflare/oxlint-config/vite-plus';
import { defineConfig } from 'vite-plus';

export default defineConfig({
  lint: {
    extends: [cloudflare],
    env: cloudflare.env,
    ignorePatterns: cloudflare.ignorePatterns,
  },
});

Run vp lint locally and in CI.

Project settings

Both examples set env and ignorePatterns explicitly because Oxlint 1.94 reads them from the root lint config. To customize the preset, add rules and overrides alongside extends. This standalone example allows non-null assertions throughout the project and console calls in scripts/.

export default defineConfig({
  extends: [cloudflare],
  env: cloudflare.env,
  ignorePatterns: cloudflare.ignorePatterns,
  rules: {
    'typescript/no-non-null-assertion': 'off',
  },
  overrides: [
    {
      files: ['scripts/**'],
      rules: { 'no-console': 'off' },
    },
  ],
});

Oxlint doesn't report TypeScript compiler errors by default, so keep your type-check command in CI or set options.typeCheck: true.

Migrating an existing project

  1. Adopt the preset in one passing commit, with newly failing rules temporarily turned off.
  2. For each rule, use one commit to enable it with fixes or explain why it stays off. Rules that don't fit the project can stay off.
  3. Open one pull or merge request for the migration and squash it when merging.

The migration skill gives coding agents the full workflow. The npm package includes it at the same path.

Rule behavior

  • Enabled rules are errors. Oxlint's category defaults are off, so Oxlint upgrades can't enable rules through category membership.
  • eqeqeq applies to null checks. Use value === null || value === undefined to check for both.
  • typescript/no-misused-promises reports promise-returning callbacks where void is expected. React projects can set checksVoidReturn: { attributes: false } in a JSX file override and catch rejections in the handler.
  • Returned promises must be awaited where it affects error handling, such as inside try. Elsewhere, return await is optional.
  • Empty interfaces are errors, including interfaces that only extend another type.
  • @ts-ignore is banned. @ts-expect-error needs a description.
  • eval, including indirect calls, is an error. So is a module importing itself.
  • TypeScript uses typescript/only-throw-error instead of no-throw-literal. JavaScript keeps no-throw-literal and turns off the five typescript/no-unsafe-* rules.
  • TypeScript test files (*.{test,spec,integration,e2e}.* and __tests__/) turn off only-throw-error, unbound-method, no-explicit-any, no-non-null-assertion, no-unsafe-argument, no-unsafe-assignment, and no-unsafe-member-access.
  • no-console applies everywhere, including the entry points that nkzw exempts. Add a file override where logging is expected.

Development

Install Vite+ and use Node.js 24 LTS (24.11+), as CI does. Run vp install, vp check, and vp test. Use vp pm pack to build a tarball for testing in a consumer project.

Open a pull request for changes. If you change a rule, include code that it now reports or allows. Maintainers squash approved pull requests after CI passes. Report vulnerabilities through the security policy.

Releases

  1. Merge the version bump to main.
  2. Create and push a signed v<version> tag on that commit.
  3. Run Publish to npm from main while main still points at the tagged commit.

The workflow checks that GitHub verified the tag and that it points at the commit being published. It then runs vp check and vp test, and publishes with provenance through npm Trusted Publishing.

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/migrate-oxlint-config/SKILL.md2.7 KBa6bffd136fb0upstream ↗
    ---
    name: migrate-oxlint-config
    description: Migrate an existing JavaScript or TypeScript project to @cloudflare/oxlint-config with a passing baseline and one reviewable commit per rule.
    ---
    
    # Migrate to @cloudflare/oxlint-config
    
    ## Commit a passing baseline
    
    1. Run the project's current lint command to establish its baseline. Adopt
       the preset using the setup for the project's lint command in the package
       README. Use `@cloudflare/oxlint-config` with standalone Oxlint or
       `@cloudflare/oxlint-config/vite-plus` with `vp lint`. Update the project's
       lint command and CI where needed.
       Carry forward applicable project rules, ignore patterns, environments,
       and file overrides. Keep the project's type-check command. If the old preset
       ran the compiler in CI, preserve that coverage with a separate type-check
       command or `options.typeCheck: true`.
    2. Run the project's lint command with the new preset across the same files
       checked in CI. Temporarily set each newly failing rule to `'off'` in the
       project config. This may disable most of the preset in a large migration.
       Keep the rest enabled. For example, add
       `'typescript/no-unsafe-assignment': 'off'` to `rules` in `oxlint.config.ts`
       or to `lint.rules` in a Vite+ project's `vite.config.ts`.
    
       If a matching file override re-enables a rule, append a scoped override
       after the inherited and project overrides to disable it there as well.
    
    3. Rerun lint and commit the dependency, config, and lint command changes as
       one passing baseline. Save the rule fixes for the subsequent commits.
    
    ## Evaluate one rule per commit
    
    For existing projects, including those migrating from an internal preset,
    decide case by case whether each new rule fits the project. It's acceptable
    to keep individual rules disabled in the project config.
    
    1. Remove one rule's temporary disables and rerun lint. If the rule fits,
       fix its findings, rerun lint, and commit the config and fixes together.
       Run the relevant tests and type checks for changes that affect code behavior
       or types.
    2. If a rule should stay off, record the reason beside its configuration in
       a commit for that rule. Scope the exception to the files that need it when
       possible. Follow the project's existing exception process for required rules
       and flag any decisions that need maintainer review.
    3. Repeat for each temporary disable. Keep the commits focused so reviewers
       can assess each rule and its fixes together.
    
    ## Review and squash
    
    Open a single pull request or merge request with the baseline commit and
    all the rule commits. Summarize any rules that remain disabled and why, and
    include the validation results. Keep the individual commits through review
    and squash them when merging.
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/cloudflare-oxlint-config-skills-migrate-oxlint-config.md

// REPO STATS

110 stars