Skip to content

1.15.0-dev LESS formatting bug #5315

@alexw10

Description

@alexw10

I think I found a bug in 1.15 with LESS formatting, this does not happen in 1.14.3

npm install -g ikatyang/prettier#feat/html/todos
➜  ~/projects/ClinicianSite prettier -v
1.15.0-dev

Less file is this:

@import 'theme-variables';

// body

body {
  background-color: @body-background-color;
  font-family: @base-font-family;
  color: @body-text-color;
}

Run --write on less file:

➜  ~/projects/ClinicianSite prettier --write ~/projects/ClinicianSite/src/styles/theme.less
src/styles/theme.less 169ms

Should now pass the -l option but does not:

➜  ~/projects/ClinicianSite prettier -l ~/projects/ClinicianSite/src/styles/theme.less
src/styles/theme.less

Also, something I observed is everytime I run the --write it adds a new line under the comment // body. If I remove the comment // body it then passes. So it seems to have something to do with comments in less files that it is not handling this properly right now.

Metadata

Metadata

Assignees

Labels

lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions