Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(no-unused-css): blank lines being left after fixing #701

Merged
merged 1 commit into from Aug 28, 2018
Merged

fix(no-unused-css): blank lines being left after fixing #701

merged 1 commit into from Aug 28, 2018

Conversation

rafaelss95
Copy link
Collaborator

@rafaelss95 rafaelss95 commented Aug 13, 2018

Currently, when you use no-unused-css's autofix, it only replaces the unused classes with an empty string, which results in many blank lines. Sample:

Input:

.test {
  color: #fff;
}
div{color: #fff;}
.test-2 {
  color: #fff;
}
.test-3 {color: #fff}
.test-4{                color:#fff;font-size: 12px;







}

button {
  color: #fff;
}

Current output:

- .test {
-   color: #fff;
- }
- div{color: #fff;}
- .test-2 {
-   color: #fff;
- }
- .test-3 {color: #fff}
- .test-4{                color:#fff;font-size: 12px;
- 
- 
- 

+ div{color: #fff;}



- }

button {
  color: #fff;
}

Output using these changes:

- .test {
-   color: #fff;
- }
- div{color: #fff;}
- .test-2 {
-   color: #fff;
- }
- .test-3 {color: #fff}
- .test-4{                color:#fff;font-size: 12px;
- 
- 
- 
- 
- 
-  
- }
+ div{color: #fff;}

button {
  color: #fff;
}

@mgechev mgechev merged commit c69e2ae into mgechev:master Aug 28, 2018
@rafaelss95 rafaelss95 deleted the fix-no-unused-css branch August 28, 2018 23:27
TarasKovalenko added a commit to TarasKovalenko/codelyzer that referenced this pull request Aug 31, 2018
fix(no-unused-css): blank lines being left after fixing (mgechev#701)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants