简体   繁体   English

Prettier 和 EsLint Tab 问题 - 好奇登录 Vue

[英]Prettier and EsLint Tab Problem - curiouse sign in Vue

I have a little problem with Prettier my code in.vue.我的代码 in.vue 中的 Prettier 有点问题。 From some time, when I save my files I get problem like this:有一段时间,当我保存我的文件时,我遇到这样的问题:

Code and problems screenshot代码和问题截图

This is my.prettierrc.js file:这是 my.prettierrc.js 文件:

module.exports = {
  bracketSpacing: true,
  trailingComma: "es5",
  tabWidth: 2,
  semi: false,
  singleQuote: false,
}

Somehow prettier is using tabs to format your code, this is not happening frequently?更漂亮的是使用制表符来格式化您的代码,这不是经常发生吗?

It looks you have an eslint or some sort of linting rule running in vscode that is expecting the format to use spaces and not tabs.看起来你在 vscode 中运行了一个 eslint 或某种 linting 规则,它期望格式使用空格而不是制表符。

Are you sure you don't have any other prettier configuration with useTabs prettier flag set to true?您确定没有将useTabs标志设置为 true 的任何其他更漂亮的配置吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM