Chris Hough
Chris Hough

Reputation: 3558

scss - lint exclusions in yml not being excluded

I am running the linter like scss-lint app/assets/stylesheets/**/*.css.scss --config=config/scss_lint.yml with the config below:

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

No matter how I structure that exclude I can not ignore the file in app/assets/stylesheets/libraries/reset.css.scss

thoughts? scss-lint

Upvotes: 1

Views: 1513

Answers (1)

Chris Hough
Chris Hough

Reputation: 3558

Both the path I was running the exclude from was wrong, and the way I was setting them in the yml file.

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

Upvotes: 3

Related Questions