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.

@vue/eslint-config-prettier fails since 4.0.0

See original GitHub issue

Version

3.1.1

Node and OS info

latest node, latest win10 and MacOS High Sierra.

Steps to reproduce

Create a project with vue-cli and @vue/eslint-config-prettier@4.0.0 or 4.0.1. Add vue/max-attributes-per-line rule.

The prettier makes carriage return without tabulation, then linter fails very often with the same error:

error: Attribute "icon" should be on a new line (vue/max-attributes-per-line) at src\views\View.vue:33:24:
  31 |         <template slot-scope="{ row }">
  32 |           <router-link :to="{ name: 'name', params: { param: value } }">
> 33 |             <el-button icon="el-icon"
     |                        ^
  34 | size="small" />
  35 |           </router-link>
  36 |         </template>

What is expected?

prettier makes my code pretty.

What is actually happening?

prettier makes my code ugly.


Since 4.0.0. We’ve checked all other deps.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
houd1nicommented, Nov 15, 2018

@LinusBorg Thanx! I’ll wait for the merge and test again, then close the issue if OK.

0reactions
sodateacommented, Nov 15, 2018

The prettier config is quite different from other configs, that is, it is used to disable certain rules rather than enabling rules. So it might be a better practice to always put it at the end of the extends array to ensure the rule override has taken effect. For your own custom rules, put them into a separate config file and prepend the path to extends in .eslintrc.js.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading @vue/eslint-config-prettier 7.0.0 causes compile ...
I was missing the package @vue/prettier/@typescript-eslint, after installing the package version matching my package.json, I was good.
Read more >
eslint-config-prettier - npm
Turns off all rules that are unnecessary or might conflict with Prettier.. Latest version: 8.5.0, last published: 6 months ago.
Read more >
[eslint] failed to load config "@vue/prettier" to extend from.
My assumption is that "no-layout-rules" means that the build is missing dependencies. In my case, after removing "@vue/prettier" from my config NPM right...
Read more >
eslint/eslint - Gitter
hello, i just updated my project to use the newest version of es-lint (6.0.1 ). and i get the following error. Error: .eslintrc.json:...
Read more >
How To Configure ESLint and Prettier for Vue.js - DigitalOcean
You can use --legacy-peer-deps to get around this error for the sake of this tutorial. At this point, you will have a new...
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