Get rid of error: Delete `␍⏎` eslint (prettier/prettier), and allow use double `cr` Visual Studio Code1.56.2 on Windows 10
Full error message
I want to use double ␍ ("carriage return" || "Enter" key) to visually separate code-sections,
and start new chaining form separate line (even if line length less then 80char).
But get an error: Delete ␍⏎eslint (prettier/prettier)
my code snippet:
router.param("id", checkId) //middleware to validate id
`␍`
`␍`
router.route("/")`␍`
.get(getAllTours)`␍`
.post(checkBody, createTour)
router.route("/:id")`␍`
.get(getTour)`␍`
.patch(updateTour)`␍`
.delete(deleteTour)
`␍`
`␍`
module.exports = router
Tried:
.eslintrc.json
'prettier/prettier': [
'error',
{
'endOfLine': 'auto',
}
]
Answer form https://stackoverflow.com/a/53769213/15580822
and also try the same in my config .prettierrc
All of this did not help. I'm getting the same error continuously...
I do not want to disable prettier completely.
But setting "endOfLine" in .eslintrc.json** ("off" - Never automatically format embedded code.)
completely disable warnings from prettier
{
'endOfLine': 'off',
}
My question:
what it actually does?
Do I disable prettier completely?
I can not find an answer here or Google...
Any thoughts how to get rid of this error and still use prettier?Solutionsource: stackoverflow \u2197
Answer is on the comments above, I had the same issue and after a bit of trial and error it was solved with: On my .eslintrc.js endOfLine: 'off' And the .prettierrc.js endOfLine: 'auto' No more issues on the ESLint output, all works fine.
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/4090f5b9272149d95ae3f8bc26a6e480986870f333dc2aa0f6a9bdc28f723c97hash \u00b7 4090f5b9272149d95ae3f8bc26a6e480986870f333dc2aa0f6a9bdc28f723c97