Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>OxcNew to Visual Studio Code? Get it now.
Oxc

Oxc

oxc

oxc.rs
|
389,446 installs
| (13) | Free
| Sponsor
Oxlint and Oxfmt editor integration
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

⚓ Oxc

The Oxidation Compiler is creating a suite of high-performance tools for JavaScript and TypeScript.

Installation

Any of the below options can be used to install the extension.

  • Install through the VS Code extensions marketplace by searching for Oxc. Verify the identifier is oxc.oxc-vscode.
  • From within VS Code, open the Quick Open (Ctrl+P or Cmd+P on macOS) and execute ext install oxc.oxc-vscode.

The extension does not bundle the Oxc tools. For the recommended setup, install the tool you want to use locally in your project: oxlint for linting and oxfmt for formatting. If you install a tool while VS Code is already open and it is not detected, run the Oxc: Restart oxlint Server and/or Oxc: Restart oxfmt Server commands, then hover over the oxc status item or check the corresponding Oxc (Lint) or Oxc (Fmt) output channel.

For Vite+ projects, the extension runs vp lint --lsp and vp fmt --lsp from the locally installed vite-plus package, so the lint and fmt fields in vite.config.* are used. It resolves vite-plus from the workspace folders, like the standalone tools. Set oxc.path.oxlint or oxc.path.oxfmt to use a standalone tool instead.

See the official Oxlint editor setup and Oxfmt editor setup guides for installation details.

Oxlint

This is the linter for Oxc. The currently supported features are listed below.

  • Highlighting for warnings or errors identified by Oxlint
  • Quick fixes to fix a warning or error when possible
  • JSON schema validation for supported Oxlint configuration files (does not include ESLint configuration files)
  • Command to fix all auto-fixable content within the current text editor.
  • Support for source.fixAll.oxc as a code action provider. Configure this in your settings editor.codeActionsOnSave to automatically apply fixes when saving the file.
  • Support for multi-root workspaces.
  • Support for type-aware linting when the oxlint-tsgolint package is installed and the oxc.typeAware setting is set to true.

Oxfmt

This is the formatter for Oxc. The currently supported features are listed below.

  • Support for source.format.oxc as a code action provider.

To enable it as your default formatter, use a VS Code settings.json like:

{
  "editor.defaultFormatter": "oxc.oxc-vscode",
  "editor.formatOnSave": true,
  "editor.formatOnSaveMode": "file", // tell oxfmt to format the whole file, not only the modified lines
  // Or enable it for specific file types:
  // "[javascript]": {
  //   "editor.defaultFormatter": "oxc.oxc-vscode"
  // },
}

To run Oxc formatting through VS Code code actions on save, configure editor.codeActionsOnSave:

{
  "editor.codeActionsOnSave": {
    "source.format.oxc": "always",
  },
}

Running formatting as a code action on save, allows to define the order of changes when both formatting and lint fixes are applied on save. For example, the below configuration will run the formatter first, and then apply lint fixes:

{
  "editor.defaultFormatter": "oxc.oxc-vscode",
  "editor.formatOnSave": false, // disable default behavior
  "editor.codeActionsOnSave": {
    "source.format.oxc": "always", // run formatter first
    "source.fixAll.oxc": "always", // run lint fixes after
  },
}

Configuration

For standalone Oxlint and Oxfmt, configuration file paths are optional:

  • oxc.configPath for Oxlint
  • oxc.fmt.configPath for Oxfmt

Leave these settings unset (null) to let each tool automatically discover configuration files. Nested configuration lookup is enabled by default; it can be disabled with oxc.disableNestedConfig for Oxlint or oxc.fmt.disableNestedConfig for Oxfmt.

Set a path only when you want to use a specific configuration file, such as one with a custom name or location. Specifying a path disables nested configuration lookup for that tool.

See the Oxlint configuration guide and Oxfmt configuration guide for supported configuration files and discovery details.

Window Configuration

Following configurations are supported via settings.json and affect the window editor:

Key Default Value Possible Values Description
oxc.enable null true | false | <null> This is a master toggle for both oxc.enable.oxlint and oxc.enable.oxfmt.
oxc.enable.oxfmt true true | false Enable oxfmt (formatter). Falls back to oxc.enable if not set.
oxc.enable.oxlint true true | false Enable oxlint (linter). Falls back to oxc.enable if not set.
oxc.path.node - <string> Path to a Node.js binary. Will be added to the oxfmt and oxlint PATH environment. Supports variables.
oxc.path.oxfmt - <string> Path to an Oxc formatter binary. Default: auto detection in node_modules. Supports variables.
oxc.path.oxlint - <string> Path to an Oxc linter binary. Default: auto detection in node_modules. Supports variables.
oxc.path.tsgolint - <string> Path to an Oxc tsgolint binary. Default: auto detection from oxlint. Supports variables.
oxc.suppressProgramErrors false true | false Suppress tsconfig errors from tsgolint and still lint files under partially-valid tsconfig projects. When enabled, sets OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true. Note: Type-aware lint rules may produce degraded results when the tsconfig is broken.
oxc.trace.server off off | messages | verbose Traces the communication between VS Code and the language server.
oxc.useExecPath false true | false Whether to use the extension's execPath (Electron's bundled Node.js) as the JavaScript runtime for running Oxc tools, instead of looking for a system Node.js installation.
Deprecated
oxc.path.server - <string> Path to Oxc language server binary. Mostly for testing the language server. Supports variables.

Workspace Configuration

Following configurations are supported via settings.json and can be changed for each workspace:

Key Default Value Possible Values Description
oxc.configPath null <string> | <null> Optional path to an Oxlint configuration file. When unset (null), Oxlint automatically discovers configuration files. Set this to use a specific file; doing so disables nested configuration. Supports variables.
oxc.disableNestedConfig false true | false Disable searching for nested configuration files. When set to true, only the configuration file specified in oxc.configPath (if any) will be used.
oxc.fixKind null safe_fix | safe_fix_or_suggestion | dangerous_fix | dangerous_fix_or_suggestion | none | all Specify the kind of fixes to suggest/apply.
oxc.fmt.configPath null <string> | <null> Optional path to an Oxfmt configuration file. When unset (null), Oxfmt automatically discovers configuration files. Set this to use a specific file; doing so disables nested configuration. Supports variables.
oxc.fmt.disableNestedConfig false true | false Disable searching for nested configuration files. When set to true, only the configuration file specified in oxc.fmt.configPath (if any) will be used.
oxc.lint.customization null Record<string, object> | <null> Customizes linting rules behavior. See https://oxc.rs/docs/guide/usage/linter/lsp-config-reference.html#rulescustomization for details.
oxc.lint.run onType onSave | onType Run the linter on save (onSave) or on type (onType)
oxc.requireConfig false true | false Start the language server only when a .oxlintrc.json(c) or oxlint.config.ts file exists in one of the workspaces.
oxc.tsConfigPath null <string> | <null> Path to the project's TypeScript config file. If your tsconfig.json is not at the root, you will need this set for the import plugin rules to resolve imports correctly. Supports variables.
oxc.typeAware null true | false | <null> Forces type-aware linting. Requires the oxlint-tsgolint package. It is preferred to use options.typeAware in your configuration file
oxc.unusedDisableDirectives null allow | warn | deny Define how directive comments like // oxlint-disable-line should be reported, when no errors would have been reported on that line anyway. It is preferred to use options.reportUnusedDisableDirectives in your configuration file
Deprecated
oxc.flags {} Record<string, string> Specific Oxlint flags to pass to the language server.
oxc.fmt.experimental true true | false Enable Oxfmt formatting support.

FixKind

  • "safe_fix" (default)
  • "safe_fix_or_suggestion"
  • "dangerous_fix"
  • "dangerous_fix_or_suggestion"
  • "none"
  • "all"

RulesCustomization

Each rule name maps to an object with the following optional properties:

  • autofix: true | false — Whether autofix should be disabled for this rule.
  • severity: "error" | "warn" | "info" | "hint" | "off" — Diagnostic severity override for this rule.

Example:

{
  "oxc.lint.customization": {
    "no-unused-vars": {
      "severity": "warning",
      "autofix": false
    }
  }
}

Variables

The following settings support variables: oxc.path.oxlint, oxc.path.oxfmt, oxc.path.server, oxc.path.tsgolint, oxc.path.node, oxc.configPath, oxc.fmt.configPath and oxc.tsConfigPath.

Variable Replaced by
${userHome} The home directory of the current user.
${env:NAME} The value of the environment variable NAME. An unset or empty variable is replaced by an empty string.

Notes:

  • ${env:NAME} is only supported in trusted workspaces. In untrusted workspaces it is left unchanged.
  • A value which is empty after the replacement counts as not configured: oxc.path.* settings use the auto detection, the config path settings are ignored.
  • Every other ${...} form (for example ${workspaceFolder}) is not supported and is left unchanged.

Sponsored By

Our sponsors

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft