我遇到了 scss-lint 的小问题,我试图在一个简单的文件中运行,并且在更改 scss-lint.yml 之后,仍然没有加载我的配置。
scss 文件:_headlines.scss
// 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
使用的命令行:
scss-lint scss/_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 但仍在运行有人知道发生了什么?