Skip to content

Commit

Permalink
Add scss-lint configuration
Browse files Browse the repository at this point in the history
This is a clone of thoughtbot's configuration from our guides
(https://github.com/thoughtbot/guides/), with the addition of
BEM-related linters enabled.
  • Loading branch information
tysongach committed Jun 2, 2017
1 parent b32cdcb commit ea5a8e4
Show file tree
Hide file tree
Showing 2 changed files with 254 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ fail_on_violations: true

ruby:
config_file: .rubocop.yml

scss:
config_file: .scss-lint.yml
251 changes: 251 additions & 0 deletions .scss-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
scss_files: "app/assets/stylesheets/**/*.scss"

severity: warning

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

BemDepth:
enabled: true
max_elements: 1

BorderZero:
enabled: true
convention: zero

ChainedClasses:
enabled: true

ColorKeyword:
enabled: true

ColorVariable:
enabled: true

Comment:
enabled: true
style: silent

DebugStatement:
enabled: true

DeclarationOrder:
enabled: true

DisableLinterReason:
enabled: false

DuplicateProperty:
enabled: true

ElsePlacement:
enabled: true
style: same_line

EmptyLineBetweenBlocks:
enabled: true
ignore_single_line_blocks: true

EmptyRule:
enabled: true

ExtendDirective:
enabled: true

FinalNewline:
enabled: true
present: true

HexLength:
enabled: true
style: short

HexNotation:
enabled: true
style: lowercase

HexValidation:
enabled: true

IdSelector:
enabled: true

ImportantRule:
enabled: true
exclude:
- "app/assets/stylesheets/utilities/**"

ImportPath:
enabled: true
leading_underscore: false
filename_extension: false

Indentation:
enabled: true
allow_non_nested_indentation: false
character: space
width: 2

LeadingZero:
enabled: true
style: include_zero

LengthVariable:
enabled: false

MergeableSelector:
enabled: true
force_nesting: true

NameFormat:
enabled: true
allow_leading_underscore: true
convention: hyphenated_lowercase

NestingDepth:
enabled: true
max_depth: 3
ignore_parent_selectors: false

PlaceholderInExtend:
enabled: true

PrivateNamingConvention:
enabled: true
prefix: _

PropertyCount:
enabled: false

PropertySortOrder:
enabled: true
ignore_unspecified: false
min_properties: 2
separate_groups: false

PropertySpelling:
enabled: true
extra_properties:
- font-variant-numeric
- text-decoration-skip

PropertyUnits:
enabled: true
global: [
'ch', 'em', 'ex', 'rem',
'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q',
'vh', 'vw', 'vmin', 'vmax',
'deg', 'grad', 'rad', 'turn',
'ms', 's',
'Hz', 'kHz',
'dpi', 'dpcm', 'dppx',
'%']
properties:
line-height: []

PseudoElement:
enabled: true

QualifyingElement:
enabled: true
allow_element_with_attribute: false
allow_element_with_class: false
allow_element_with_id: false

SelectorDepth:
enabled: true
max_depth: 3

SelectorFormat:
enabled: true
convention: hyphenated_BEM

Shorthand:
enabled: true

SingleLinePerProperty:
enabled: true
allow_single_line_rule_sets: true

SingleLinePerSelector:
enabled: true

SpaceAfterComma:
enabled: true
style: at_least_one_space

SpaceAfterComment:
enabled: true
style: at_least_one_space
allow_empty_comments: true

SpaceAfterPropertyColon:
enabled: true
style: at_least_one_space

SpaceAfterPropertyName:
enabled: true

SpaceAfterVariableColon:
enabled: true
style: at_least_one_space

SpaceAfterVariableName:
enabled: true

SpaceAroundOperator:
enabled: true
style: at_least_one_space

SpaceBeforeBrace:
enabled: true
style: space
allow_single_line_padding: false

SpaceBetweenParens:
enabled: true
spaces: 0

StringQuotes:
enabled: true
style: double_quotes

TrailingSemicolon:
enabled: true

TrailingWhitespace:
enabled: true

TrailingZero:
enabled: true

TransitionAll:
enabled: true

UnnecessaryMantissa:
enabled: true

UnnecessaryParentReference:
enabled: true

UrlFormat:
enabled: false

UrlQuotes:
enabled: true

VariableForProperty:
enabled: false

VendorPrefix:
enabled: true
identifier_list: base

ZeroUnit:
enabled: true

Compass::*:
enabled: false

0 comments on commit ea5a8e4

Please sign in to comment.