Skip to content

doesn't remove unicode BOM from empty file #6461

@alexander-akait

Description

@alexander-akait

Prettier 1.18.2
No playground.

For example using CLI:

prettier --write test.js

Input:

Empty file with unicode BOM

Output:

Empty file with unicode BOM

Expected behavior:

Empty file without unicode BOM

If you add content BOM will be remove.

.editorconfig

# For more information please visit http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs discussionIssues needing discussion and a decision to be made before action can be taken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions