@vue/eslint-config-prettier fails since 4.0.0
See original GitHub issueVersion
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:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@LinusBorg Thanx! I’ll wait for the merge and test again, then close the issue if OK.
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 toextends
in.eslintrc.js
.