Skip to content

fix: type-check defaultLanguageOptions against LangOptions#420

Merged
DMartens merged 1 commit intomainfrom
fix/core-default-language-options-type
Mar 30, 2026
Merged

fix: type-check defaultLanguageOptions against LangOptions#420
DMartens merged 1 commit intomainfrom
fix/core-default-language-options-type

Conversation

@Pixel998
Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

This PR ensures Language.defaultLanguageOptions is type-checked against a language’s LangOptions type instead of the broad LanguageOptions base type.

What changes did you make? (Give an overview)

  • Updated the Language type in @eslint/core so defaultLanguageOptions uses Options["LangOptions"].
  • Added a type test.

Related Issues

Is there anything you'd like reviewers to focus on?

@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Mar 29, 2026
@eslint-github-bot eslint-github-bot Bot added the bug Something isn't working label Mar 29, 2026
@Pixel998 Pixel998 moved this from Needs Triage to Implementing in Triage Mar 30, 2026
@DMartens
Copy link
Copy Markdown

Changes LGTM, thanks.
I wondered why all the other interface properties used the type parameter.
It seems the reason is that the PR #110, which introduces the type parameter LanguageOptions, and the PR #123 adding defaultLanguageOptions overlapped and it was simply an oversight.

@DMartens DMartens merged commit 7bf5704 into main Mar 30, 2026
32 checks passed
@DMartens DMartens deleted the fix/core-default-language-options-type branch March 30, 2026 21:56
@github-project-automation github-project-automation Bot moved this from Implementing to Complete in Triage Mar 30, 2026
@eslintbot eslintbot mentioned this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants