feat(oxlint): introduce defineConfig helper#18596
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
9349081 to
9c0b3ff
Compare
a2e021c to
e7a8e8d
Compare
96f46ab to
a1c8987
Compare
74fe512 to
2e27db3
Compare
a1c8987 to
6366c63
Compare
5bb84b9 to
c8b3456
Compare
04ba7f4 to
921b8e5
Compare
6c30b25 to
f79a359
Compare
921b8e5 to
ee81897
Compare
f79a359 to
a657b5a
Compare
ee81897 to
0244bda
Compare
a657b5a to
b55af5a
Compare
0244bda to
abd908c
Compare
b55af5a to
acafcdd
Compare
1a141e9 to
83212e8
Compare
970a9f1 to
35f8a57
Compare
17a279f to
992304d
Compare
57eb8c2 to
949c77e
Compare
|
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. |
949c77e to
9059c17
Compare
b76b816 to
e7dd108
Compare
9059c17 to
440b215
Compare
e7dd108 to
f46fa8d
Compare
440b215 to
9d93fa0
Compare
f46fa8d to
9a0b06b
Compare
9d93fa0 to
580364e
Compare
9a0b06b to
cb7ab8b
Compare
14bda94 to
fe03d4a
Compare
cb7ab8b to
3b152f1
Compare
fe03d4a to
954ab38
Compare
3b152f1 to
99f5427
Compare
954ab38 to
19c3e4b
Compare
99f5427 to
2b0ca3c
Compare
19c3e4b to
4613733
Compare
2b0ca3c to
83e65b1
Compare
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. |
Merge activity
|
There was a problem hiding this comment.
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
defineConfighelper 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
defineConfigwith the#oxlintimport 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.
|
Is there any plan for documentation update? There are so many features that do not appear in docs. |
|
We found a bug where this doesn't work correctly with jsPlugins, so I delayed updating the docs till the next release. |

No description provided.