scss - yml中的lint排除项未被排除

时间:2014-08-05 20:40:28

标签: ruby-on-rails ruby sass lint

我正在运行像scss-lint app/assets/stylesheets/**/*.css.scss --config=config/scss_lint.yml这样的linter,其配置如下:

exclude:
 - app/assets/stylesheets/libraries/reset.css.scss
 - app/assets/stylesheets/libraries/foundation.css.scss

linters:
  BorderZero:
    enabled: true

  CapitalizationInSelector:
    enabled: true

  ColorKeyword:
    enabled: true

  Comment:
    enabled: true

  DebugStatement:
    enabled: true

  DeclarationOrder:
    enabled: false

  DuplicateProperty:
    enabled: true

  ElsePlacement:
    enabled: true
    style: same_line # or 'new_line'

  EmptyLineBetweenBlocks:
    enabled: true
    ignore_single_line_blocks: true

  EmptyRule:
    enabled: true

  FinalNewline:
    enabled: true
    present: true

  HexLength:
    enabled: true
    style: short # or 'long'

  HexNotation:
    enabled: true
    style: lowercase # or 'uppercase'

  HexValidation:
    enabled: true

  IdWithExtraneousSelector:
    enabled: true

  Indentation:
    enabled: true
    character: space # or 'tab'
    width: 2

  LeadingZero:
    enabled: true
    style: exclude_zero # or 'include_zero'

  MergeableSelector:
    enabled: true
    force_nesting: true

  NameFormat:
    enabled: true
    convention: hyphenated_lowercase # or 'BEM', or a regex pattern

  PlaceholderInExtend:
    enabled: true

  PropertySortOrder:
    enabled: false
    ignore_unspecified: false

  PropertySpelling:
    enabled: true
    extra_properties: []

  SelectorDepth:
    enabled: true
    max_depth: 5

  Shorthand:
    enabled: true

  SingleLinePerProperty:
    enabled: true
    allow_single_line_rule_sets: true

  SingleLinePerSelector:
    enabled: true

  SpaceAfterComma:
    enabled: true

  SpaceAfterPropertyColon:
    enabled: true
    style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'

  SpaceAfterPropertyName:
    enabled: true

  SpaceBeforeBrace:
    enabled: true
    allow_single_line_padding: false

  SpaceBetweenParens:
    enabled: true
    spaces: 0

  StringQuotes:
    enabled: true
    style: single_quotes # or double_quotes

  TrailingSemicolon:
    enabled: true

  UnnecessaryMantissa:
    enabled: true

  UnnecessaryParentReference:
    enabled: true

  UrlFormat:
    enabled: true

  UrlQuotes:
    enabled: true

  ZeroUnit:
    enabled: true

  Compass::*:
    enabled: false

无论我如何构建排除,我都无法忽略app/assets/stylesheets/libraries/reset.css.scss

中的文件

想法? scss-lint

1 个答案:

答案 0 :(得分:3)

我运行排除的路径都是错误的,以及我在yml文件中设置它们的方式。

exclude:
 - '../app/assets/stylesheets/libraries/reset.css.scss'
 - '../app/assets/stylesheets/libraries/foundation.css.scss'