Skip to content

refactor: Base ShellLanguageOptions on core LanguageOptions - #43

Merged
nzakas merged 1 commit into
mainfrom
fix/language-options-type
Nov 30, 2026
Merged

nzakas merged 1 commit into
mainfrom
fix/language-options-type

Conversation

@nzakas

@nzakas nzakas commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Follow-up to the last open review thread on #3, where it was suggested that ShellLanguageOptions extend LanguageOptions from @eslint/core for consistency with the other language plugins.

What changed

  • src/types.ts: ShellLanguageOptions is now LanguageOptions from @eslint/core rather than its own { [key: string]: unknown } interface.

Notes for reviewers

  • The original suggestion also added a variant?: ShellVariant member, but that option has since been removed (the dialect is chosen by the language: shell/bash, shell/posix, or shell/mksh).
  • With no members left, an interface ... extends LanguageOptions {} fails @typescript-eslint/no-empty-object-type, so this uses a type alias. The resulting type is the same as before (Record<string, unknown>), so there is no change for users.
  • @eslint/core is already a runtime dependency, so the published .d.ts resolves.

Testing

Typecheck, build, lint, and all 369 tests pass.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Updated language option typing for improved compatibility with ESLint. No end-user-facing behavior changes.

Define `ShellLanguageOptions` as `@eslint/core`'s `LanguageOptions`
instead of a standalone index-signature interface, for consistency
with the other language plugins. The resulting type is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eslintbot eslintbot added this to Triage Nov 30, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Nov 30, 2026
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

ShellLanguageOptions now aliases LanguageOptions from @eslint/core instead of using an open string-indexed interface.

Changes: Shell language options type

Layer / File(s) Summary
Use the core language options type
src/types.ts
The file imports LanguageOptions from @eslint/core and uses it as the ShellLanguageOptions type.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Refactor

Suggested reviewers: dmartens, lumirlumir, mdjermanovic

Merge Risk: Minimal · up to fd840

This is a type-only refactor that aligns the shell language options type with the core ESLint type. No user-visible behavior change is expected, and no concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "refactor: Base ShellLanguageOptions on core LanguageOptions" names the main change. The changeset replaces the index-signature interface in src/types.ts with a type alias to `Language…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "refactor: Base ShellLanguageOptions on core LanguageOptions" names the main change. The changeset replaces the index-signature interface in src/types.ts with a type alias to LanguageOptions from @eslint/core. The title is specific and conveys the primary change to a reader scanning history.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 13654069-acb4-45ea-9771-ecf5d70e7c56
Commits

Reviewing files that changed from the base of the PR and between 2a58b26 and fd840fa.

Files selected for processing: 1

  • src/types.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@nzakas
nzakas merged commit ea548b5 into main Nov 30, 2026
24 checks passed
@nzakas
nzakas deleted the fix/language-options-type branch November 30, 2026 18:42
@github-project-automation github-project-automation Bot moved this from Needs Triage to Complete in Triage Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

1 participant