Skip to content

feat(oxlint): introduce defineConfig helper#18596

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/01-26-feat_oxlint_introduce_defineconfig_helper
Feb 1, 2026
Merged

feat(oxlint): introduce defineConfig helper#18596
graphite-app[bot] merged 1 commit intomainfrom
c/01-26-feat_oxlint_introduce_defineconfig_helper

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Jan 26, 2026

No description provided.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-enhancement Category - New feature or request labels Jan 26, 2026
Copy link
Contributor Author

camc314 commented Jan 26, 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 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-26-feat_oxlint_introduce_defineconfig_helper branch from a2e021c to e7a8e8d Compare January 26, 2026 20:06
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch 2 times, most recently from 96f46ab to a1c8987 Compare January 26, 2026 20:17
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch 2 times, most recently from 74fe512 to 2e27db3 Compare January 26, 2026 20:29
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from a1c8987 to 6366c63 Compare January 26, 2026 20:29
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from 5bb84b9 to c8b3456 Compare January 26, 2026 20:32
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch 2 times, most recently from 04ba7f4 to 921b8e5 Compare January 26, 2026 20:32
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch 2 times, most recently from 6c30b25 to f79a359 Compare January 27, 2026 00:20
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 921b8e5 to ee81897 Compare January 27, 2026 00:20
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from f79a359 to a657b5a Compare January 27, 2026 00:22
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from ee81897 to 0244bda Compare January 27, 2026 00:22
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from a657b5a to b55af5a Compare January 28, 2026 13:39
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 0244bda to abd908c Compare January 28, 2026 13:39
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from b55af5a to acafcdd Compare January 28, 2026 14:04
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from 1a141e9 to 83212e8 Compare January 28, 2026 15:03
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 970a9f1 to 35f8a57 Compare January 28, 2026 15:03
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from 17a279f to 992304d Compare January 28, 2026 15:10
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 57eb8c2 to 949c77e Compare January 28, 2026 15:10
@connorshea
Copy link
Member

My only major concern is whether we should consider naming this helper defineExperimentalConfig for now?

To make it explicit and enable us to more easily make breaking changes to this API in the next few releases if necessary.

@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 949c77e to 9059c17 Compare February 1, 2026 22:16
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch 2 times, most recently from b76b816 to e7dd108 Compare February 1, 2026 22:24
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 9059c17 to 440b215 Compare February 1, 2026 22:24
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from e7dd108 to f46fa8d Compare February 1, 2026 22:25
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 440b215 to 9d93fa0 Compare February 1, 2026 22:25
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from f46fa8d to 9a0b06b Compare February 1, 2026 22:25
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 9d93fa0 to 580364e Compare February 1, 2026 22:25
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from 9a0b06b to cb7ab8b Compare February 1, 2026 22:28
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch 2 times, most recently from 14bda94 to fe03d4a Compare February 1, 2026 22:28
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from cb7ab8b to 3b152f1 Compare February 1, 2026 22:28
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from fe03d4a to 954ab38 Compare February 1, 2026 22:33
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from 3b152f1 to 99f5427 Compare February 1, 2026 22:33
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 954ab38 to 19c3e4b Compare February 1, 2026 22:36
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from 99f5427 to 2b0ca3c Compare February 1, 2026 22:36
@camc314 camc314 force-pushed the c/01-01-draft_feat_linter_implement_oxlint.config.ts_support branch from 19c3e4b to 4613733 Compare February 1, 2026 22:38
@camc314 camc314 force-pushed the c/01-26-feat_oxlint_introduce_defineconfig_helper branch from 2b0ca3c to 83e65b1 Compare February 1, 2026 22:38
@camc314
Copy link
Contributor Author

camc314 commented Feb 1, 2026

My only major concern is whether we should consider naming this helper defineExperimentalConfig for now?

To make it explicit and enable us to more easily make breaking changes to this API in the next few releases if necessary.

i think this is fine - if we name it "experimental" it means people have to migrate when we make it non-experimental which is a pain.

Copy link
Contributor Author

camc314 commented Feb 1, 2026

Merge activity

  • Feb 1, 10:45 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 1, 11:19 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 1, 11:26 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Feb 1, 11:33 PM UTC: Merged by the Graphite merge queue.

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 introduces a defineConfig helper function for oxlint configuration files, following the pattern established by similar helpers like definePlugin and defineRule. The helper provides type inference for TypeScript config files while being a no-op at runtime.

Changes:

  • Added defineConfig helper and comprehensive TypeScript type definitions for oxlint configuration
  • Exported the new helper and types from the main index module
  • Added test fixture demonstrating usage of defineConfig with the #oxlint import alias

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/oxlint/src-js/package/config.ts Implements defineConfig helper and defines TypeScript types for oxlint configuration including OxlintConfig, OxlintOverride, and related utility types
apps/oxlint/src-js/index.ts Exports defineConfig function and configuration types from the main entry point
apps/oxlint/test/fixtures/js_config_define_config/oxlint.config.ts Test configuration file demonstrating usage of defineConfig with #oxlint import
apps/oxlint/test/fixtures/js_config_define_config/output.snap.md Expected test output snapshot verifying that defineConfig works correctly
apps/oxlint/test/fixtures/js_config_define_config/files/test.js Test input file with linting violations to validate configuration

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

@Mister-Hope
Copy link

Is there any plan for documentation update? There are so many features that do not appear in docs.

@camc314
Copy link
Contributor Author

camc314 commented Feb 9, 2026

We found a bug where this doesn't work correctly with jsPlugins, so I delayed updating the docs till the next release.

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.

4 participants