Skip to content

Commit

Permalink
Update SCSS-Lint configuration (#869)
Browse files Browse the repository at this point in the history
- Update to latest version of SCSS-Lint (v0.53)
- Aligns mostly with thoughtbot's configuration, with a few additional
  linters enabled, for example BEM selector naming.
  - Ref: https://github.com/thoughtbot/guides/blob/master/style/sass/.scss-lint.yml

Closes #827
  • Loading branch information
tysongach authored and nickcharlton committed May 7, 2017
1 parent 93e134f commit 6e88449
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
42 changes: 23 additions & 19 deletions .scss-lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Up-to-date with SCSS-Lint v0.43.2
scss_files: "app/assets/stylesheets/administrate/**/*.scss"

scss_files: "**/*.scss"
severity: warning

linters:
BangFormat:
Expand All @@ -18,14 +18,12 @@ linters:

ChainedClasses:
enabled: true
severity: warning

ColorKeyword:
enabled: true

ColorVariable:
enabled: true
severity: warning

Comment:
enabled: true
Expand Down Expand Up @@ -55,7 +53,7 @@ linters:
enabled: true

ExtendDirective:
enabled: false
enabled: true

FinalNewline:
enabled: true
Expand Down Expand Up @@ -106,16 +104,16 @@ linters:
enabled: true
max_depth: 3
ignore_parent_selectors: false
severity: warning

PlaceholderInExtend:
enabled: true

PrivateNamingConvention:
enabled: true
prefix: _

PropertyCount:
enabled: false
include_nested: false
max_properties: 10
severity: warning

PropertySortOrder:
enabled: true
Expand All @@ -127,7 +125,7 @@ linters:
enabled: true
extra_properties:
- font-variant-numeric
disabled_properties: []
- text-decoration-skip

PropertyUnits:
enabled: true
Expand All @@ -140,7 +138,8 @@ linters:
'Hz', 'kHz',
'dpi', 'dpcm', 'dppx',
'%']
properties: {}
properties:
line-height: []

PseudoElement:
enabled: true
Expand All @@ -161,7 +160,6 @@ linters:

Shorthand:
enabled: true
allowed_shorthands: [1, 2, 3]

SingleLinePerProperty:
enabled: true
Expand All @@ -172,15 +170,24 @@ linters:

SpaceAfterComma:
enabled: true
style: one_space
style: at_least_one_space

SpaceAfterComment:
enabled: true
style: at_least_one_space
allow_empty_comments: true

SpaceAfterPropertyColon:
enabled: true
style: one_space
style: at_least_one_space

SpaceAfterPropertyName:
enabled: true

SpaceAfterVariableColon:
enabled: true
style: at_least_one_space

SpaceAfterVariableName:
enabled: true

Expand Down Expand Up @@ -208,10 +215,10 @@ linters:
enabled: true

TrailingZero:
enabled: false
enabled: true

TransitionAll:
enabled: false
enabled: true

UnnecessaryMantissa:
enabled: true
Expand All @@ -227,13 +234,10 @@ linters:

VariableForProperty:
enabled: false
properties: []

VendorPrefix:
enabled: true
identifier_list: base
additional_identifiers: []
excluded_identifiers: []

ZeroUnit:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/administrate/components/_cells.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
right: 0;

svg {
fill: $hint-grey;
height: 100%;
transition: transform $base-duration $base-timing;
fill: $hint-grey;
}
}

Expand Down

0 comments on commit 6e88449

Please sign in to comment.