Conversation
There was a problem hiding this comment.
Pull request overview
Refactors the project’s internal config/type model to reuse oxlint’s published TypeScript types, and updates rule/plugin/env/global transformation logic accordingly.
Changes:
- Replaced locally-defined Oxlint config/override/category/rule types with types imported from
oxlint. - Updated rule/plugin/env/global transforms and cleanup to handle nullable fields (
null) in config shapes. - Adjusted constants and tests to align with updated plugin/category typings (e.g., plugin name expectations).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Switches to oxlint-sourced types; introduces new exported type aliases for config, overrides, categories, and rule config values. |
| src/plugins_rules.ts | Updates rule severity normalization/merging types, adds warning for unsupported rule config values, and handles nullable plugins. |
| src/jsPlugins.ts | Updates rule-entry typing and handles nullable jsPlugins; assigns resolved rules into config. |
| src/index.ts | Adds a non-null assertion after config initialization (type-narrowing workaround). |
| src/env_globals.ts | Adds null checks for env/globals (and overrides/env cleanup paths) to match nullable config fields. |
| src/constants.ts | Tightens plugin-prefix mapping values to Oxlint plugin type. |
| src/cleanup.ts | Updates cleanup guards to handle nullable globals/env. |
| src/cleanup.test.ts | Updates expected plugin name in override fixture (oxc). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The internal oxlint types are also exported by this package.
I trade this increasing type definitions for correctness. I removed the ESLint types because they did get really big