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?