2016-08-29 22 views
0

私はscss-lintに少し問題がありました。私は単純なファイルで実行しようとしていますが、scss-lint.ymlの変更後もまだ私の設定をロードしていません。scss-lint.ymlが動作しません。

SCSSファイル:

scss-lint scss/_headlines.scss 

ファイルsctrucute:

enter image description here使用

// Headlines 

%headline-primary { 
    @include rem-size(60px); 
    color: palette(grey, light); 
    font-weight: $font-weight--book; 
    line-height: $line-height-base; 
    margin-top: 0; 
} 

SCSS-lint.yml

# Default application configuration that all configurations inherit from. 

scss_files: "scss/**/*.scss" 
plugin_directories: ['.scss-linters'] 

# List of gem names to load custom linters from (make sure they are already 
# installed) 
plugin_gems: [] 

# Default severity of all linters. 
severity: warning 

linters: 
    ColorKeyword: 
    enabled: false 

    ColorVariable: 
    enabled: false 

コマンドライン_headlines.scss

scss/_headlines.scss:5:1 [W] TrailingWhitespace: Line contains trailing whitespace 
scss/_headlines.scss:5:18 [W] ColorKeyword: Color `grey` should be written in hexadecimal form as `#808080` 
scss/_headlines.scss:5:18 [W] ColorVariable: Color literals like `grey` should only be used in variable declarations; they should be referred to via variable everywhere else. 
scss/_headlines.scss:9:1 [W] FinalNewline: Files should end with a trailing newline 
ColorKeywordはscss-lint.ymlでfalseと定義されていますが、まだ実行中のことが分かっていますか? scss-lint documentation

答えて

1

は、以下が指定されている:

SCSS-リント負荷の次の優先順位で構成

構成:介して指定

  1. 構成ファイル - -configフラグ
  2. 現在の.scss-lint.ymlからの設定それは

すべての構成は、デフォルトの設定を拡張存在している場合、それは、ユーザのホームディレクトリに.scss-lint.ymlから

  • 設定が存在する場合は、作業ディレクトリ。

  • scss-lint-testの現在の作業ディレクトリには.scss-lint.ymlはありません。したがって、デフォルト設定を使用します。

    これを解決するには、YMLファイルをscss-lint-testに移動するか、scssフォルダからscss-lintを実行します。

    +0

    ありがとう – Raduken

    関連する問題