简体   繁体   English

ESLint 禁用特定的换行规则

[英]ESLint disable specific rule for line break

I have the following code:我有以下代码:

import {
  reactSelectStyleCustom,
  reactSelectStyleDefault,
} from '~/helper/const'

I need to change a specific ESLint rule to get something like this:我需要更改特定的 ESLint 规则以获得如下内容:

import { reactSelectStyleCustom, reactSelectStyleDefault } from '~/helper/const'

I've tried adding the "linebreak-style" at .eslintrc.json but didn't work我试过在 .eslintrc.json 添加“换行样式”但没有用

"rules": {
  "linebreak-style": 0,
} 

This triggers the "object-curly-spacing" lint, so ignore it:这会触发“对象卷曲间距” lint,因此请忽略它:

"rules": {
  "object-curly-spacing": "off",
}

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

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