Skip to content

Bug: selector-complexity reports keyframe selectors as type selectors #582

Description

@Pixel998

Environment

ESLint version: v10.11.0
@eslint/css version: v2.0.0
Node version: v24.16.0
npm version: v11.13.0
Operating System: windows

Which language are you using?

stylesheet

What did you do?

Configuration
import css from "@eslint/css";

export default [
	{
		files: ["**/*.css"],
		plugins: { css },
		language: "css/css",
		rules: {
			"css/selector-complexity": ["error", { maxTypes: 0 }],
		},
	},
];
/* eslint css/selector-complexity: ["error", { "maxTypes": 0 }] */

@keyframes fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

What did you expect to happen?

No errors. Keyframe selectors should not be counted by maxTypes.

What actually happened?

4:2  Exceeded maximum type selector. Only 0 allowed.
8:2  Exceeded maximum type selector. Only 0 allowed.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/stackblitz-starters-yykapbcr

Participation

  • I am willing to submit a pull request for this issue.

AI acknowledgment

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

Additional comments

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

  • Status
    Needs Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions