-
-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionbugSomething isn't workingSomething isn't working
Description
Environment
ESLint version: 9.36.0
@eslint/css version: 0.11.1
Node version:
npm version:
Operating System:
Which language are you using?
stylesheet
What did you do?
@import "a.css"
@import "a.css"\fWhat did you expect to happen?
Duplicate @import rules should be removed entirely, including the newline after them, regardless of newline type.
What actually happened?
Fixers removed the intended node or text but left orphaned blank lines when the newline was CR or FF.
Link to Minimal Reproducible Example
n/a
Participation
- I am willing to submit a pull request for this issue.
Additional comments
According to the CSS Syntax Module Level 3, CSS defines newline as one of:
- Line Feed (
\n) - Carriage Return + Line Feed (
\r\n) - Carriage Return (
\r) - Form Feed (
\f)
Some CSS rules with autofix functionality, such as no-duplicate-imports and no-important, assume that newlines are \n when computing ranges for fixes. This causes incorrect behavior when CSS files contain \r or \f newlines.
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionbugSomething isn't workingSomething isn't working
Type
Projects
Status
Complete