10000 feat: Add extendable config types by nzakas · Pull Request #210 · eslint/rewrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add extendable config types #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025
Merged

feat: Add extendable config types #210

merged 2 commits into from
Jun 6, 2025

Conversation

nzakas
Copy link
Member
@nzakas nzakas commented May 21, 2025

Prerequisites checklist

What is the purpose of this pull request?

Adds interfaces for settings and rules can be extended by plugins.

What changes did you make? (Give an overview)

  • Added SettingsConfig interface
  • Added RulesConfig interface
  • Updated LinterOptionsConfig interface (for completeness)
  • Updated types tests

Related Issues

fixes #208

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

Just a note that once this is released, we'll need to update the Config type in the eslint package.

Copy link
@Copilot 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 adds new extendable interfaces for ESLint's configuration, allowing plugins to extend settings and rules.

  • Added new interfaces (SettingsConfig, RulesConfig, and extended LinterOptionsConfig) in the core types.
  • Updated tests to verify the new type definitions.
  • Modified the eslint.config.js file to ignore test files.

Reviewed Changes

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

File Description
packages/core/tests/types/types.test.ts Added tests for the new config types and sample rule configurations; note a potential typo.
packages/core/src/types.ts Updated type definitions to include extended interfaces for settings and rules configurations.
eslint.config.js Added an ignore pattern for test files to improve configuration behavior.
Comments suppressed due to low confidence (1)

packages/core/tests/types/types.test.ts:76

  • The variable 'ruelConfig5' appears to be misspelled; consider renaming it to 'ruleConfig5' for clarity.
const ruelConfig5: RuleConfig<[{ available: "widely" | "newly" }]> = [

@fasttime fasttime moved this from Needs Triage to Triaging in Triage May 22, 2025
@fasttime fasttime moved this from Triaging to Implementing in Triage May 22, 2025
Co-authored-by: Francesco Trotta <github@fasttime.org>
Copy link
Member
@fasttime fasttime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Leaving open for a second review.

8000
@fasttime fasttime moved this from Implementing to Second Review Needed in Triage May 24, 2025
@nzakas
Copy link
Member Author
nzakas commented Jun 5, 2025

@mdjermanovic can you take a look at this?

Copy link
Member
@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 3089754 into main Jun 6, 2025
18 checks passed
@mdjermanovic mdjermanovic deleted the issue208 branch June 6, 2025 17:41
@github-project-automation github-project-automation bot moved this from Second Review Needed to Complete in Triage Jun 6, 2025
@github-actions github-actions bot mentioned this pull request Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Change Request: Provide extendable interfaces for settings, rules in config
3 participants
0