eslint-config
eslint-config copied to clipboard
format/prettier error on windows
Describe the bug
It's OK on Linux.
Reproduction
https://github.com/Daydreamer-riri/vite-react-ssg README file
System Info
windows 11
Used Package Manager
pnpm
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a minimal reproducible of the bug.
I don't use Windows and couldn't test out - can you help verify if it's still an issue with the latest version?
I've just upgraded to the latest version, but the issue still persists.
https://github.com/antfu/eslint-config/assets/70067449/3c22bd12-28b3-409c-97b3-761cbf2abc98
This seems to be a problem with 'CRLF' when I switch 'CRLF' to 'LF' in vscode, the error disappears...
Hi @antfu , I made a minimum repo: https://github.com/daydreamer-riri/exlint-prettier-crf-error
https://github.com/antfu/eslint-config/assets/70067449/2508fb79-9eff-4791-9aa7-1e3763c0b7c2
This is a problem that may be upstream.
This seems to be a problem with 'CRLF' when I switch 'CRLF' to 'LF' in vscode, the error disappears...
@Daydreamer-riri I think if you just set VSCode, Prettier options, and Gitattributes to use LF
, the error won't exist. This is probably just a mismatch between ESLint rules' EOL and Prettier's EOL.