eslint-config icon indicating copy to clipboard operation
eslint-config copied to clipboard

format/prettier error on windows

Open Daydreamer-riri opened this issue 1 year ago • 5 comments

Describe the bug

image

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.

Daydreamer-riri avatar Feb 02 '24 18:02 Daydreamer-riri

I don't use Windows and couldn't test out - can you help verify if it's still an issue with the latest version?

antfu avatar Apr 22 '24 11:04 antfu

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

Daydreamer-riri avatar Apr 22 '24 14:04 Daydreamer-riri

This seems to be a problem with 'CRLF' when I switch 'CRLF' to 'LF' in vscode, the error disappears...

Daydreamer-riri avatar Apr 22 '24 17:04 Daydreamer-riri

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.

Daydreamer-riri avatar Apr 22 '24 18:04 Daydreamer-riri

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.

pauliesnug avatar Jul 20 '24 18:07 pauliesnug