Skip to content

linter: non deterministic results with jsPlugins due to reuse of context object #19986

@taichi221228

Description

@taichi221228

What version of Oxlint are you using?

1.50.0

What command did you run?

oxlint

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

import { defineConfig } from "oxlint";
// @ts-expect-error @pandacss/eslint-plugin has no type declarations
import pandacss from "@pandacss/eslint-plugin";

export default defineConfig({
  jsPlugins: [{ name: "@pandacss", specifier: "@pandacss/eslint-plugin" }],
  rules: {
    ...pandacss.configs.recommended.rules,
    "@pandacss/no-escape-hatch": "warn",
    "@pandacss/no-important": "warn",
    "@pandacss/prefer-longhand-properties": "warn",
    "@pandacss/prefer-atomic-properties": "warn",
  },
});

What happened?

When using jsPlugins with a plugin that internally uses synckit (such as @pandacss/eslint-plugin), oxlint silently drops all warnings from that plugin when more than one thread is used (the default).

No diagnostic is emitted — the output simply shows Found 0 warnings and 0 errors.

Steps to Reproduce

  1. Install @pandacss/eslint-plugin and configure it via jsPlugins:

    // oxlint.config.ts
    import { defineConfig } from "oxlint";
    import pandacss from "@pandacss/eslint-plugin";
    
    export default defineConfig({
      jsPlugins: [{ name: "@pandacss", specifier: "@pandacss/eslint-plugin" }],
      rules: {
        ...pandacss.configs.recommended.rules,
        "@pandacss/prefer-atomic-properties": "warn",
      },
    });
  2. Create a source file with a violation:

    // src/App.tsx
    import { css } from "./styled-system/css";
    
    export function App() {
      return <div className={css({ background: "red", padding: "4" })} />;
    }
  3. Run oxlint (default: uses multiple threads):

    Found 0 warnings and 0 errors.
    

    Expected warnings are silently missing. The same occurs with --threads=2, confirming any thread count above 1 triggers the issue.

  4. Run oxlint --threads=1:

    ! @pandacss(prefer-atomic-properties): Use atomic properties instead of `background`. ...
    ! @pandacss(prefer-atomic-properties): Use atomic properties instead of `padding`. ...
    Found 2 warnings and 0 errors.
    

    Warnings appear correctly.

Expected Behavior

Warnings from @pandacss/eslint-plugin are reported correctly regardless of the number of threads, as they are with --threads=1.

Actual Behavior

Warnings are silently dropped. No diagnostic output or error message appears, so the failure is completely invisible to the user.

Environment

oxlint 1.50.0
@pandacss/eslint-plugin 0.3.1
Node.js v25.4.0
OS macOS Darwin 25.3.0 (arm64)

Workaround

Add --threads=1 to the oxlint command:

{
  "scripts": {
    "lint": "oxlint --threads=1"
  }
}

Metadata

Metadata

Assignees

Labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions