Skip to content

Error in New Projects: ␍ eslint/prettier issue with file logging. #6

@EngenMe

Description

@EngenMe

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

image

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:

  1. Create a new project using this repo.
  2. run npm i to install all dependencies.
  3. Log any file in the route.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions