Skip to content

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

Fixes types for the patterns option of the no-restricted-imports rule.

What changes did you make? (Give an overview)

  • A patterns object should be valid without either of importNames, importNamePattern, allowImportNames or allowImportNamePattern specified. For example, "no-restricted-imports": [2, { patterns: [{ group: ["foo"] }] }] was invalid before this change.
  • importNames and importNamePattern can be specified in the same object. For example, "no-restricted-imports": [2, { patterns: [{ group: ["foo"], importNames: ["bar"], importNamePattern: "baz" }] }] was invalid before this change.
  • Mixing strings and objects is not allowed. For example, "no-restricted-imports": [2, { patterns: [{ group: ["foo"], importNames: ["bar"]}, "bar"] }] was valid before this change.

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

@mdjermanovic mdjermanovic requested a review from a team as a code owner August 23, 2025 17:03
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Aug 23, 2025
@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Aug 23, 2025
Copy link

netlify bot commented Aug 23, 2025

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 9b3becf
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/68a9f4625ea95000095c96f5

@fasttime fasttime moved this from Needs Triage to Triaging in Triage Aug 24, 2025
@fasttime fasttime added the accepted There is consensus among the team that this change meets the criteria for inclusion label Aug 24, 2025
@fasttime fasttime moved this from Triaging to Implementing in Triage Aug 24, 2025
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!

@fasttime fasttime merged commit dabbe95 into main Aug 24, 2025
34 of 43 checks passed
@fasttime fasttime deleted the types-fix-norestrictedimports branch August 24, 2025 09:50
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Aug 24, 2025
@fasttime fasttime added the types Related to TypeScript types label Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly types Related to TypeScript types

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants