BigW Consortium Gitlab

.scss-lint.yml 7.31 KB
Newer Older
1 2 3 4 5 6 7 8 9
# Linter Documentation:
# https://github.com/brigade/scss-lint/blob/master/lib/scss_lint/linter/README.md

scss_files: 'app/assets/stylesheets/**/*.scss'

exclude:
  - 'app/assets/stylesheets/pages/emojis.scss'

linters:
10 11
  # Reports when you use improper spacing around ! (the "bang") in !default,
  # !global, !important, and !optional flags.
12 13 14
  BangFormat:
    enabled: false
  
15
  # Whether or not to prefer `border: 0` over `border: none`.
16 17 18
  BorderZero:
    enabled: false
  
19 20 21 22 23 24 25
  # Reports when you define a rule set using a selector with chained classes
  # (a.k.a. adjoining classes).
  ChainedClasses:
    enabled: false

  # Prefer hexadecimal color codes over color keywords.
  # (e.g. `color: green` is a color keyword)
26 27 28
  ColorKeyword:
    enabled: false
  
29 30 31
  # Prefer color literals (keywords or hexadecimal codes) to be used only in
  # variable declarations. They should be referred to via variables everywhere
  # else.
32 33 34
  ColorVariable:
    enabled: false
  
35
  # Which form of comments to prefer in CSS.
36 37
  Comment:
    enabled: false
38 39 40 41

  # Reports @debug statements (which you probably left behind accidentally).
  DebugStatement:
    enabled: false
42
  
43 44 45 46 47
  # Rule sets should be ordered as follows:
  # - @extend declarations
  # - @include declarations without inner @content
  # - properties, @include declarations with inner @content
  # - nested rule sets.
48 49 50 51 52 53 54 55 56 57
  DeclarationOrder:
    enabled: false

  # `scss-lint:disable` control comments should be preceded by a comment
  # explaining why these linters are being disabled for this file.
  # See https://github.com/brigade/scss-lint#disabling-linters-via-source for
  # more information.
  DisableLinterReason:
    enabled: true
  
58
  # Reports when you define the same property twice in a single rule set.
59 60 61
  DuplicateProperty:
    enabled: false
  
62
  # Separate rule, function, and mixin declarations with empty lines.
63
  EmptyLineBetweenBlocks:
64
    enabled: true
65
  
66
  # Reports when you have an empty rule set.
67
  EmptyRule:
68
    enabled: true
69
  
70 71 72 73 74 75 76
  # Reports when you have an @extend directive.
  ExtendDirective:
    enabled: false

  # Files should always have a final newline. This results in better diffs
  # when adding lines to the file, since SCM systems such as git won't
  # think that you touched the last line.
77 78 79 80 81
  FinalNewline:
    enabled: false
  
  # HEX colors should use three-character values where possible.
  HexLength:
82
    enabled: false
83 84 85 86 87 88
  
  # HEX color values should use lower-case colors to differentiate between
  # letters and numbers, e.g. `#E3E3E3` vs. `#e3e3e3`.
  HexNotation:
    enabled: true
  
89
  # Avoid using ID selectors.
90 91 92
  IdSelector:
    enabled: false
  
93 94
  # The basenames of @imported SCSS partials should not begin with an
  # underscore and should not include the filename extension.
95 96 97
  ImportPath:
    enabled: false
  
98 99
  # Avoid using !important in properties. It is usually indicative of a
  # misunderstanding of CSS specificity and can lead to brittle code.
100 101 102 103 104 105 106 107
  ImportantRule:
    enabled: false
  
  # Indentation should always be done in increments of 2 spaces.
  Indentation:
    enabled: true
    width: 2
  
108
  # Don't write leading zeros for numeric values with a decimal point.
109 110 111
  LeadingZero:
    enabled: false
  
112
  # Reports when you define the same selector twice in a single sheet.
113 114 115
  MergeableSelector:
    enabled: false
  
116 117
  # Functions, mixins, variables, and placeholders should be declared
  # with all lowercase letters and hyphens instead of underscores.
118 119 120
  NameFormat:
    enabled: false
  
121
  # Avoid nesting selectors too deeply.
122 123 124
  NestingDepth:
    enabled: false

125
  # Always use placeholder selectors in @extend.
126 127 128
  PlaceholderInExtend:
    enabled: false

129
  # Sort properties in a strict order.
130 131 132
  PropertySortOrder:
    enabled: false
  
133 134
  # Reports when you use an unknown or disabled CSS property
  # (ignoring vendor-prefixed properties).
135 136 137
  PropertySpelling:
    enabled: false
  
138 139 140 141 142 143 144
  # Configure which units are allowed for property values.
  PropertyUnits:
    enabled: false

  # Pseudo-elements, like ::before, and ::first-letter, should be declared
  # with two colons. Pseudo-classes, like :hover and :first-child, should
  # be declared with one colon.
145
  PseudoElement:
146
    enabled: true
147
  
148
  # Avoid qualifying elements in selectors (also known as "tag-qualifying").
149 150 151
  QualifyingElement:
    enabled: false
  
152
  # Don't write selectors with a depth of applicability greater than 3.
153 154 155 156 157 158
  SelectorDepth:
    enabled: false
  
  # Selectors should always use hyphenated-lowercase, rather than camelCase or
  # snake_case.
  SelectorFormat:
159
    enabled: false
160 161 162 163 164 165 166 167 168 169 170 171
    convention: hyphenated_lowercase
  
  # Prefer the shortest shorthand form possible for properties that support it.
  Shorthand:
    enabled: true
  
  # Each property should have its own line, except in the special case of
  # single line rulesets.
  SingleLinePerProperty:
    enabled: true
    allow_single_line_rule_sets: true

172 173
  # Split selectors onto separate lines after each comma, and have each
  # individual selector occupy a single line.
174
  SingleLinePerSelector:
175
    enabled: true
176
  
177
  # Commas in lists should be followed by a space.
178 179 180 181 182 183 184 185 186 187 188 189
  SpaceAfterComma:
    enabled: false
  
  # Properties should be formatted with a single space separating the colon
  # from the property's value.
  SpaceAfterPropertyColon:
    enabled: true

  # Properties should be formatted with no space between the name and the
  # colon.
  SpaceAfterPropertyName:
    enabled: true
190 191 192 193

  # Variables should be formatted with a single space separating the colon
  # from the variable's value.
  SpaceAfterVariableColon:
194
    enabled: true
195 196 197 198 199

  # Variables should be formatted with no space between the name and the
  # colon.
  SpaceAfterVariableName:
    enabled: false
200
  
201 202
  # Operators should be formatted with a single space on both sides of an
  # infix operator.
203
  SpaceAroundOperator:
204
    enabled: true
205
  
206
  # Opening braces should be preceded by a single space.
207
  SpaceBeforeBrace:
208
    enabled: true
209 210 211 212

  # Parentheses should not be padded with spaces.
  SpaceBetweenParens:
    enabled: false
213
  
214 215
  # Enforces that string literals should be written with a consistent form
  # of quotes (single or double).
216 217 218
  StringQuotes:
    enabled: false

219 220
  # Property values, @extend, @include, and @import directives, and variable
  # declarations should always end with a semicolon.
221
  TrailingSemicolon:
222
    enabled: true
223

224
  # Reports lines containing trailing whitespace.
225
  TrailingWhitespace:
226
    enabled: true
227

228 229 230 231 232 233 234 235 236
  # Don't write trailing zeros for numeric values with a decimal point.
  TrailingZero:
    enabled: false

  # Don't use the `all` keyword to specify transition properties.
  TransitionAll:
    enabled: false

  # Numeric values should not contain unnecessary fractional portions.
237 238 239
  UnnecessaryMantissa:
    enabled: false

240 241
  # Do not use parent selector references (&) when they would otherwise
  # be unnecessary.
242 243
  UnnecessaryParentReference:
    enabled: false
244 245 246
  
  # URLs should be valid and not contain protocols or domain names.
  UrlFormat:
247
    enabled: true
248 249 250

  # URLs should always be enclosed within quotes.
  UrlQuotes:
251
    enabled: true
252 253 254 255 256

  # Properties, like color and font, are easier to read and maintain
  # when defined using variables rather than literals.
  VariableForProperty:
    enabled: false
257

258
  # Avoid vendor prefixes. Or rather: don't write them yourself.
259 260 261 262 263 264
  VendorPrefix:
    enabled: false

  # Omit length units on zero values, e.g. `0px` vs. `0`.
  ZeroUnit:
    enabled: true