You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
=====
The prettier parser was set to `typescript` in the `.prettierrc.json` file. Because prettier was
used for multiple files types, it caused errors when formatting files that were not TypeScript.
Here is an example:
```sh
README.md
[error] README.md: SyntaxError: Invalid character. (1:1)
[error] > 1 | # Neovim node.js client
[error] | ^
[error] 2 |
[error] 3 | | CI (node >= 14, Linux/macOS/Windows) | Coverage | npm |
[error] 4 | |----------------------------|----------|-----|
```
This seems to cause the build to fail as of the most recent commit
7488014
Solution
========
Automatically infer the parser based on the file extension.
References:
- https://prettier.io/docs/en/configuration.html#setting-the-parserdocsenoptionshtmlparser-option
To make the build pass, run `npx prettier --write .` to format all files. I think it's best that
someone else does this, as it will change the formatting of many files (currently 43), and reviewing
them is very difficult.
0 commit comments