-
Notifications
You must be signed in to change notification settings - Fork 29
Description
When creating a new project using this repo, I encountered an issue while trying to log to any file in the route. The following error appears in the console:
Delete ␍ eslintprettier/prettier
I think that the issue occurs due to a mismatch in the line endings used across different systems (Windows vs. Unix-based systems). The error stems from the presence of carriage return (␍) characters, which are common in Windows environments but not expected by the default ESLint/Prettier configuration in the repo.
Steps to Reproduce:
- Create a new project using this repo.
- run
npm ito install all dependencies. - Log any file in the route.
- Observe the ESLint/Prettier error in the terminal or editor.
Proposed Solution:
To fix the issue, simply add the following line to the .eslintrc file:
"prettier/prettier": ["error", { "endOfLine": "auto" }]
This will make Prettier automatically handle the line endings based on the user's environment, preventing the error from occurring.
After adding this line, the error disappears, and logging works as expected across different environments.
