简体   繁体   English

Sublime Text 3 SCSS-Contrib-Lint不使用.scss-lint.yml

[英]Sublime Text 3 SCSS-Contrib-Lint not using .scss-lint.yml

I can't seem to get SublimeLinter-scss-contrib-lint to work in Sublime Text 3. I have the .scss-lint.yml file in my root, and it appears to run off the command line (though whether off my file or default settings I'm not sure). 我似乎无法让SublimeLinter-scss-contrib-lint在Sublime Text 3中工作。我的根目录中有.scss-lint.yml文件,它似乎在命令行下运行(尽管是否关闭了我的文件)或不确定的默认设置)。 I've installed the package via Package Manager and it is in my SublimeLinter.sublime.settings file, but when I make errors on purpose they are never picked up. 我已经通过“软件包管理器”安装了该软件包,并且该软件包位于我的SublimeLinter.sublime.settings文件中,但是当我故意出错时,它们永远都不会发生。

// Snippet of .scss-lint.yml
scss_files: "/app/www/scss/*.scss"

linters:
  BangFormat:
    enabled: true
    space_before_bang: true
    space_after_bang: false

  BorderZero:
    enabled: true

  ColorKeyword:
    enabled: true

  Comment:
    enabled: true

// Sublime Linters
"linters": {
    "annotations": {
        ... // removed linter settings for readability, but to show which ones I'm using
    },
    "csslint": {
        ...
    },
    "jshint": {
        ...
    },
    "json": {
        ...
    },
    "php": {
        ...
    },
    "scss": {
        "@disable": false,
        "args": [],
        "exclude-linter": "",
        "excludes": [],
        "include-linter": ""
    }
},

There are a bunch of different stackoverflow questions on this, but none seem to fit my question. 关于此问题有很多不同的stackoverflow问题,但似乎没有一个适合我的问题。 I'm using Windows if that helps, and all the gems are installed and working. 如果有帮助,我正在使用Windows,并且所有gems均已安装并正常工作。

It seems submlimelinter-scss-lint caches configs at runtime. 看来submlimelinter-scss-lint在运行时缓存配置。 Restarting sublime did the trick for me. 重新开始崇高对我来说是成功的诀窍。

https://github.com/attenzione/SublimeLinter-scss-lint/issues/19 https://github.com/attenzione/SublimeLinter-scss-lint/issues/19

My .scss-lint.yml that lives at project root: 我的.scss-lint.yml位于项目根目录:

scss_files: 'src/css/**/*.scss'

linters:
  Indentation:
    severity: warning
    width: 1
    character: tab

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

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