Skip to content

fix: handle all CSS newlines in rules#280

Merged
mdjermanovic merged 2 commits into
eslint:mainfrom
sethamus:css-newline-handling-in-rules
Oct 5, 2025
Merged

fix: handle all CSS newlines in rules#280
mdjermanovic merged 2 commits into
eslint:mainfrom
sethamus:css-newline-handling-in-rules

Conversation

@sethamus

@sethamus sethamus commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

Prerequisites checklist

What is the purpose of this pull request?

Some CSS rules assumed that \n was the only newline. According to the CSS specification, newlines are /\r\n|[\r\n\f]/. This caused incorrect fixer behavior and false negatives when source code contained \r or \f.

What changes did you make? (Give an overview)

  • Updated fixers to correctly handle all CSS newlines (\r, \r\n, \n, \f).
  • Added new tests for \r\n, \r, and \f cases.

Related Issues

See #276

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

@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Sep 30, 2025
@eslint-github-bot eslint-github-bot Bot added the bug Something isn't working label Sep 30, 2025
@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Oct 4, 2025
@lumirlumir lumirlumir requested a review from a team October 4, 2025 10:07
@mdjermanovic

Copy link
Copy Markdown
Member

Can you fix merge conflicts?

@sethamus

sethamus commented Oct 5, 2025

Copy link
Copy Markdown
Contributor Author

Done!

@mdjermanovic mdjermanovic left a comment

Copy link
Copy Markdown
Member

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 ed0c0f1 into eslint:main Oct 5, 2025
22 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Triage to Complete in Triage Oct 5, 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 Something isn't working contributor pool

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants