question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"error Delete `⏎` prettier/prettier" in .vue files

See original GitHub issue

I am using the create-nuxt-app to create a nuxt 2.0 application with prettier included. I am running vscode on a windows machine. My package.json looks like this (nothing changed compared to the template):

{
  "name": "test",
  "version": "1.0.0",
  "description": "Test",
  "author": "",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate",
    "lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
    "precommit": "npm run lint"
  },
  "dependencies": {
    "cross-env": "^5.2.0",
    "nuxt": "^2.0.0",
    "@nuxtjs/axios": "^5.0.0"
  },
  "devDependencies": {
    "nodemon": "^1.11.0",
    "babel-eslint": "^8.2.1",
    "eslint": "^5.0.1",
    "eslint-loader": "^2.0.0",
    "eslint-plugin-vue": "^4.0.0",
    "eslint-config-prettier": "^3.1.0",
    "eslint-plugin-prettier": "2.6.2",
    "prettier": "1.14.3"
  }
}

The error “error Delete prettier/prettier” in .vue files" still persists. I tried to search for a solution, but the only thing that I could find was this old issue (https://github.com/prettier/eslint-plugin-prettier/issues/42) which stated that the issue was resolved over a year ago. Guess it’s back?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
gentuniancommented, Oct 8, 2018

This problem exists and has to do with the newlines inserted.

Take for example this error:

code/nodejs/nuxt.js/foo/pages/index.vue
  36:1  error  Delete `⏎`  prettier/prettier

Then, go to line 36. You will notice a newline between the style tag and the styles definitions. Remove that line and error is gone.

<style>

.container {

If you have this error in another file, just follow the same procedure.

8reactions
BPScottcommented, Oct 1, 2018

Does running yarn run lint --fix cause the errors to be fixed (it does for me)? That create-nuxt-app’s default app contains a file that is not formatted to prettier’s standard is an issue with create-nuxt-app (as per my prior comment).

This is only an issue with prettier / eslint-plugin-prettier if the issue persists after running running a prettier command that should fix the reported error

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get rid of Delete `··` (prettier/prettier) errors in a Vue JS ...
I got Some error, "error Delete ␍ prettier/prettier" in multiple lines on my code, then I resolved this issue by follow these steps...
Read more >
Vue.js – Error Delete 'CR' prettier/prettier Visual Studio Code
I'm using Visual Studio Code, so I changed the settings from Preferences > settings > Extensions > Vetur , I changed the Format...
Read more >
How to get rid of Delete `··` (prettier/prettier) errors in a Vue JS ...
I got Some error, "error Delete ␍ prettier/prettier" in multiple lines on my ... Your current text is using 4-space tabs, but Prettier...
Read more >
Vue 之编译之处理warning Delete ` ` prettier/prettier - CSDN博客
1)如果没有加eslint,提交代码的时候,项目的仓库默认是Linux环境下提交的代码,就会提示将会覆盖换行符为LF。
Read more >
warning delete ·· (prettier/prettier) - CodeAntenna
warning delete ·· (prettier/prettier) 解决在vuejs项目中,运行如下命令解决:. npm run lint --fix 参考“error Delete ⏎ prettier/prettier” in .vue files.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found