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.

Conflict with eslint-plugin-vue

See original GitHub issue

What version of eslint are you using? ^5.14.1

What version of prettier are you using? 1.16.4

What version of eslint-plugin-prettier are you using? 3.0.1

Please paste any applicable config files that you’re using (e.g. .prettierrc or .eslintrc files)

module.exports = {
  root: true,
  env: {
    browser: true,
    node: true
  },
  parserOptions: {
    parser: 'babel-eslint'
  },
  extends: ['@nuxtjs', 'plugin:vue/recommended', 'plugin:prettier/recommended'],
  plugins: ['prettier', 'vue'],
  // add your custom rules here
  rules: {}
}

What source code are you linting? Both of these will show cause eslint to error when using ‘plugin:prettier/recommended’ and ‘plugin:vue/recommended’

<img src="one.jpg" /> <img src="one.jpg">

image image

What did you expect to happen? To be able to format an image without error

What actually happened? Impossible to format image without error.


Its worth noting that this conflict on appears on certain versions (current latest included)

A snippet of my versions from package.json

    "eslint": "^5.14.1",
    "eslint-config-prettier": "^4.0.0",
    "eslint-config-standard": ">=12.0.0",
    "eslint-loader": "^2.1.2",
    "eslint-plugin-import": ">=2.16.0",
    "eslint-plugin-jest": ">=22.3.0",
    "eslint-plugin-node": ">=8.0.1",
    "eslint-plugin-prettier": "3.0.1",
    "eslint-plugin-promise": ">=4.0.1",
    "eslint-plugin-standard": ">=4.0.0",
    "eslint-plugin-vue": "^5.2.2",

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
mittalyashucommented, Jan 14, 2021

Make sure you put all the Prettier extends at the end of the list.

@j-f1 Something like this?

extends: [
	"eslint:recommended",
	"plugin:vue/recommended",
	"plugin:prettier/recommended"
]
2reactions
j-f1commented, Feb 26, 2019

Try extending prettier/vue too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User Guide | eslint-plugin-vue
Official ESLint plugin for Vue.js. ... Use eslint-config-prettier for Prettier not to conflict with the shareable config provided by this ...
Read more >
remove old version of eslint that causes a conflict
I type y then I get an error indicating a conflict of eslint versions ... eslint-plugin-vue@5.2.3 npm ERR! node_modules/eslint-plugin-vue ...
Read more >
@vue/eslint-config-typescript - npm
Some of its rules, however, might conflict with prettier . So when used alongside other sharable configs, this config should be placed after...
Read more >
vue file with mustache code-format conflict with eslint-plugin-vue
.vue file with mustache code-format conflict with eslint-plugin-vue Follow ... Here is a demo. ... Under the mustache expression, the formatting ...
Read more >
Setting Up ESLint & Prettier In A Vue.js Project - Redberry
npm install --save-dev eslint eslint-plugin-vue ... Next, turning off ESLint formatting rules is necessary to avoid conflicting with ...
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