简体   繁体   English

Linter 设置:导入时没有换行符,包括花括号

[英]Linter Setup: no line-break on imports including curly braces

Started working with vue.js recently and I can't figure out why my import statements always break to a new line on save:最近开始使用 vue.js ,我不明白为什么我的导入语句总是在保存时换行:

import {
    businessSignup
} from './businessSignup.module';
import {
    user,
    guest
} from './people.module';

I'd really prefer the following code style.我真的更喜欢下面的代码风格。

import { businessSignup } from './businessSignup.module';
import { user, guest } from './people.module';

I'm aware that there is babel-eslint, eslint, as well as my vscode editor, all suspect to play a role in this, however I'm not very experienced with linter configuration yet.我知道有 babel-eslint、eslint 以及我的 vscode 编辑器,都怀疑在其中发挥作用,但是我对 linter 配置还不是很有经验。 Hope there is a quick solution to this.希望有一个快速的解决方案。 :-) :-)

I've managed to fix my own error.我已经设法解决了我自己的错误。 Turns out it wasn't related to any of the stated tools like babel, eslint nor vscode settings.事实证明,它与 babel、eslint 或 vscode 设置等任何所述工具无关。

I must have installed a quite popular extension called Beautify way back.我一定已经安装了一个非常流行的扩展,叫做Beautify I've disabled it for my particular workspace and now the curly braces stay in line.我已经为我的特定工作区禁用了它,现在花括号保持一致。

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

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