Support configuration files with UTF-8 BOM (#20127)
This commit is contained in:
1 parent
6bc99db278
commit
1a36a7defd
5 files changed
+79
-10
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#### Support configuration files with UTF-8 BOM (#20127 by @fisker)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```console
|
||||
# Input
|
||||
$ cat .prettierrc.json
|
||||
{"semi":false}
|
||||
$ prettier example.js --check
|
||||
|
||||
# Prettier stable
|
||||
Invalid configuration for file "example.js":
|
||||
JSON Error in .prettierrc.json:
|
||||
Unexpected token "" (\u{feff})
|
||||
|
||||
# Prettier main
|
||||
Checking formatting...
|
||||
[warn] example.js
|
||||
[warn] Code style issues found in the above file. Run Prettier with --write to fix.
|
||||
```
|
||||
Reference in new issue
Block a user