简体   繁体   English

SublimeText - CSSLint 忽略字母顺序

[英]SublimeText - CSSLint ignore alphabetical order

I'm using Sublime Text 3 and SublimeLinter CSSLint.我正在使用 Sublime Text 3 和 SublimeLinter CSSLint。

How can I disable the order-alphabetical warnings?如何禁用顺序字母警告?

I've found this link: https://github.com/SublimeLinter/SublimeLinter-csslint/issues/15我找到了这个链接: https://github.com/SublimeLinter/SublimeLinter-csslint/issues/15

Preferences > Package Settings > SublimeLinter > Settings.首选项 > Package 设置 > SublimeLinter > 设置。

I get this window:我得到这个 window:

在此处输入图像描述

Then what?然后呢?

Someone suggested the following code:有人建议以下代码:

"linters": {
    "csslint": {
        "@disable": false,
        "args": [],
        "errors": "",
        "excludes": [],
        "ignore": ["order-alphabetical"],
        "warnings": ""
    },

I've tried copying and pasting into the right hand pane (// SublimeLinter Settings - User) but I get an error message:我尝试复制并粘贴到右侧窗格(// SublimeLinter 设置 - 用户),但我收到一条错误消息:

在此处输入图像描述

What am I doing wrong?我究竟做错了什么? Should I paste this into the left pane/window?我应该将其粘贴到左窗格/窗口中吗? Do I delete the text "// SublimeLinter Settings - User"?我是否删除文本“// SublimeLinter Settings - User”?

Thank you谢谢

While Sublime Text allows comments in its JSON-like settings format, you need to make sure the rest of notation is valid.虽然 Sublime Text 允许以类似 JSON 的设置格式进行注释,但您需要确保符号的 rest 有效。 Hence, your settings should look something like this:因此,您的设置应如下所示:

{
    "linters": {
        "csslint": {
            "@disable": false,
            "args": [],
            "errors": "",
            "excludes": [],
            "ignore": ["order-alphabetical"],
            "warnings": ""
        }
    }
}

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

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