Skip to content

feat(linter): implement oxlint.config.ts support#17563

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/01-01-draft_feat_linter_implement_oxlint.config.ts_support
Feb 1, 2026
Merged

feat(linter): implement oxlint.config.ts support#17563
graphite-app[bot] merged 1 commit intomainfrom
c/01-01-draft_feat_linter_implement_oxlint.config.ts_support

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Jan 1, 2026

Refs: #17527

note: this does not include language server support

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins labels Jan 1, 2026
Copy link
Contributor Author

camc314 commented Jan 1, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camc314 camc314 self-assigned this Jan 2, 2026
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch 3 times, most recently from 72ac379 to ac6ec7e Compare January 8, 2026 15:09
@camc314 camc314 changed the base branch from main to graphite-base/17563 January 16, 2026 16:08
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from ac6ec7e to c84173e Compare January 16, 2026 16:08
@camc314 camc314 changed the base branch from graphite-base/17563 to c/01-16-refactor_linter_rename_setup_configs_to_setup_rule_configs January 16, 2026 16:08
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 6a0665a to c617664 Compare January 16, 2026 18:37
@camc314 camc314 force-pushed the c/01-16-refactor_linter_rename_setup_configs_to_setup_rule_configs branch from 1929ac6 to ae28df8 Compare January 16, 2026 18:37
@graphite-app graphite-app bot changed the base branch from c/01-16-refactor_linter_rename_setup_configs_to_setup_rule_configs to graphite-base/17563 January 16, 2026 18:47
@graphite-app graphite-app bot force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from c617664 to e5bf768 Compare January 16, 2026 18:54
@graphite-app graphite-app bot force-pushed the graphite-base/17563 branch from ae28df8 to b6a065e Compare January 16, 2026 18:54
@graphite-app graphite-app bot changed the base branch from graphite-base/17563 to main January 16, 2026 18:55
@graphite-app graphite-app bot force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from e5bf768 to 4cbf73f Compare January 16, 2026 18:55
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 4cbf73f to 4f9fb40 Compare January 26, 2026 16:42
@camc314 camc314 changed the title DRAFT: feat(linter): implement oxlint.config.ts support feat(linter): implement oxlint.config.ts support Jan 26, 2026
@github-actions github-actions bot added the C-enhancement Category - New feature or request label Jan 26, 2026
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 4f9fb40 to 9349081 Compare January 26, 2026 19:58
@camc314 camc314 changed the base branch from main to graphite-base/17563 January 26, 2026 20:06
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 9349081 to 9c0b3ff Compare January 26, 2026 20:06
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch 4 times, most recently from 5e202e7 to 060fd65 Compare January 28, 2026 14:27
@camc314 camc314 changed the base branch from main to graphite-base/17563 January 28, 2026 14:36
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 060fd65 to 7fddcca Compare January 28, 2026 14:36
@camc314 camc314 force-pushed the graphite-base/17563 branch from 37f46a1 to 122aff7 Compare January 28, 2026 14:36
@camc314 camc314 changed the base branch from graphite-base/17563 to c/01-28-refactor_linter_rename_default_oxlintrc_to_default_oxlintrc_name January 28, 2026 14:36
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 7fddcca to e6d3347 Compare January 28, 2026 14:36
@graphite-app graphite-app bot changed the base branch from c/01-28-refactor_linter_rename_default_oxlintrc_to_default_oxlintrc_name to graphite-base/17563 January 28, 2026 14:43
@graphite-app graphite-app bot force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from e6d3347 to 3813d10 Compare January 28, 2026 14:56
@graphite-app graphite-app bot force-pushed the graphite-base/17563 branch from 122aff7 to 25a2416 Compare January 28, 2026 14:56
@graphite-app graphite-app bot changed the base branch from graphite-base/17563 to main January 28, 2026 14:56
@graphite-app graphite-app bot force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 3813d10 to 0279fcc Compare January 28, 2026 14:57
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch 8 times, most recently from 580364e to 14bda94 Compare February 1, 2026 22:28
Copy link
Contributor Author

camc314 commented Feb 1, 2026

Merge activity

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements support for TypeScript configuration files (oxlint.config.ts) in oxlint, enabling users to define linting configurations using TypeScript/JavaScript instead of JSON. This addresses issue #17527 and provides a more flexible configuration system for complex rule configurations, particularly in large monorepos where different teams maintain separate linting configs.

Changes:

  • Added TypeScript config file support (oxlint.config.ts) with conflict detection to prevent both JSON and TS configs in the same directory
  • Implemented parallel JS/TS config loading through Node.js with proper error handling for missing runtime, invalid exports, and execution errors
  • Extended config discovery to detect both .oxlintrc.json and oxlint.config.ts files, with validation and override support

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
apps/oxlint/src/run.rs Wires up JS config loader callback to CLI runner through NAPI interface
apps/oxlint/src/lint.rs Adds config loader callback support to CliRunner with conditional compilation
apps/oxlint/src/lib.rs Exports new js_config module and defines TS config filename constant
apps/oxlint/src/js_config.rs Implements Rust-side JS config loader with JSON response parsing and error handling
apps/oxlint/src/config_loader.rs Extends config discovery and loading to support TS files with conflict detection
apps/oxlint/src/lsp/server_linter.rs Updates error handling to support configs without paths
apps/oxlint/src-js/js_config.ts Implements Node.js-side config loading using dynamic imports with validation
apps/oxlint/test/fixtures/js_config_* Comprehensive test fixtures covering basic usage, errors, conflicts, and overrides
Comments suppressed due to low confidence (1)

apps/oxlint/src/run.rs:14

  • The same cfg attribute is applied twice in succession (lines 13 and 14). This is likely a mistake. One should be #[cfg(not(all(target_pointer_width = "64", target_endian = "little")))] and the other should be #[cfg(all(target_pointer_width = "64", target_endian = "little"))]. Currently, line 13 has the negation but line 14 doesn't negate it, so the import is only effective on 64-bit little-endian platforms. However, having both attributes on the same item means the second one overrides the first, making line 13 ineffective.
use crate::{
    init::{init_miette, init_tracing},

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Refs: #17527

note: this does not include language server support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants