sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

recent upgrade of editorconfig broke beautify for CSS files #138

Closed MiloBem closed 7 years ago

MiloBem commented 7 years ago

I'm pretty sure it used to work correctly but since the last update of editorconfing the behaviour of my atom-beautify got really strange, as far as I can tell it's only for CSS files.

before:

.expert .nav-tabs>li>a {
<tab>border-color: red;
}

after

.expert .nav-tabs>li>a {
<tab><tab><tab><tab>border-color: red;
}

it not only sets a tab width to four characters (which you can't actually see here:) ) but also inserts four tabs instead of one, for some reason, so the actual final indentation is 16 (4x4) columns

Involved .editorconfig-files

root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
tab_width = 4
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true
florianb commented 7 years ago

Thank you for reporting that issue. I am investigating.

florianb commented 7 years ago

This issue belongs to https://github.com/Glavin001/atom-beautify - you might want to open the issue there.

Editorconfig is only taking action when saving a file (trimming trailing whitespaces and newlines) and when you invoke the Fix File-command (the fix-file-changes can be undone).

I am able to reproduce your issue and it seems like beautify is trying to apply .editorconfig-settings and it seems this isn't working as expected. But this misbehavior relies in their responsibility. I am sorry i couldn't help.