Skip to content

feat: check duplicate comma-separated @keyframe selectors - #522

Open
Tanujkanti4441 wants to merge 2 commits into
eslint:mainfrom
Tanujkanti4441:check-selectors-with-comma
Open

feat: check duplicate comma-separated @keyframe selectors#522
Tanujkanti4441 wants to merge 2 commits into
eslint:mainfrom
Tanujkanti4441:check-selectors-with-comma

Conversation

@Tanujkanti4441

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?

To also check the duplicate @Keyframe selectors that are comma-separated.

What changes did you make? (Give an overview)

Added a loop to go through every selector in a rule instead of just the first one to enable checking comma-separated selectors as duplicates, and added related test cases also. Now rule no-duplicate-keyframe-selectors will also report cases such as:

@keyframes a {
	0%, 50% { top: 0; }
	50% { top: 1px; }
}

@keyframes a {
	from, 0% { top: 0; }
	50% { top: 1px; }
}

@keyframes a {
	entry 0%, { top: 0; }
	entry 0%, 50% { top: 1px; }
}

Related Issues

Fixes #459

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

Comment thread src/rules/no-duplicate-keyframe-selectors.js
@DMartens DMartens added the accepted There is consensus among the team that this change meets the criteria for inclusion label Aug 2, 2026
@DMartens DMartens moved this from Needs Triage to Implementing in Triage Aug 2, 2026

@DMartens DMartens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes LGTM, thanks. As this is a feature leaving open for a second review.

@DMartens DMartens moved this from Implementing to Second Review Needed in Triage Aug 6, 2026
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 feature

Projects

Status: Second Review Needed

Development

Successfully merging this pull request may close these issues.

Rule Change: check comma-separated keyframe selector also

2 participants