|
| 1 | +linters: |
| 2 | + # color: #000 !important; instead of color: #000!important; |
| 3 | + BangFormat: |
| 4 | + enabled: true |
| 5 | + space_before_bang: true |
| 6 | + space_after_bang: false |
| 7 | + |
| 8 | + # .block__element instead of .block__element__subelement |
| 9 | + BemDepth: |
| 10 | + enabled: true |
| 11 | + max_elements: 1 |
| 12 | + |
| 13 | + # border: none instead of border: 0 |
| 14 | + BorderZero: |
| 15 | + enabled: true |
| 16 | + convention: none |
| 17 | + |
| 18 | + # color: #0f0; instead of color: green; |
| 19 | + ColorKeyword: |
| 20 | + enabled: true |
| 21 | + |
| 22 | + # color: $body-color; instead of color: #0f0; |
| 23 | + # DISABLED for now |
| 24 | + ColorVariable: |
| 25 | + enabled: false |
| 26 | + |
| 27 | + # prefer // instead of /* ... */ comments |
| 28 | + # DISABLED because we minify anyway |
| 29 | + Comment: |
| 30 | + enabled: false |
| 31 | + |
| 32 | + # Reports leftover @debug statements |
| 33 | + DebugStatement: |
| 34 | + enabled: true |
| 35 | + |
| 36 | + # Correct order: @extend, @include without inner @content, properties, @include with inner @content, nested rule sets |
| 37 | + DeclarationOrder: |
| 38 | + enabled: true |
| 39 | + |
| 40 | + # Provide a reason when disabling specific linters |
| 41 | + DisableLinterReason: |
| 42 | + enabled: true |
| 43 | + |
| 44 | + # Warns you about duplicate properties |
| 45 | + DuplicateProperty: |
| 46 | + enabled: true |
| 47 | + |
| 48 | + # Place @else elements in same line as preceding curly brace |
| 49 | + ElsePlacement: |
| 50 | + enabled: true |
| 51 | + style: same_line # or 'new_line' |
| 52 | + |
| 53 | + # Leave one empty line between rule, function and mixin declarations |
| 54 | + # Ignore single line blocks (e.g. for icon background-position) |
| 55 | + EmptyLineBetweenBlocks: |
| 56 | + enabled: true |
| 57 | + ignore_single_line_blocks: true |
| 58 | + |
| 59 | + # Warns about empty rule sets |
| 60 | + EmptyRule: |
| 61 | + enabled: true |
| 62 | + |
| 63 | + # Warns about @extend directives |
| 64 | + # DISABLED because we use @extend sometimes |
| 65 | + ExtendDirective: |
| 66 | + enabled: false |
| 67 | + |
| 68 | + # Ensures you add a final new line in files for better diffs |
| 69 | + # If you use Sublime Text, add "ensure_newline_at_eof_on_save": true to your settings to ensure that |
| 70 | + FinalNewline: |
| 71 | + enabled: true |
| 72 | + present: true |
| 73 | + |
| 74 | + # color: #f2e; instead of color: #ff22ee; |
| 75 | + HexLength: |
| 76 | + enabled: true |
| 77 | + style: short |
| 78 | + |
| 79 | + # color: #fff; instead of color: #FFF; |
| 80 | + HexNotation: |
| 81 | + enabled: true |
| 82 | + style: lowercase |
| 83 | + |
| 84 | + # Ensures hex colours are valid |
| 85 | + HexValidation: |
| 86 | + enabled: true |
| 87 | + |
| 88 | + # Avoid IDs for styling |
| 89 | + # Read more at http://screwlewse.com/2010/07/dont-use-id-selectors-in-css/ |
| 90 | + IdSelector: |
| 91 | + enabled: true |
| 92 | + |
| 93 | + # Warns against using !important |
| 94 | + # DISABLED because we use !important sometimes |
| 95 | + ImportantRule: |
| 96 | + enabled: false |
| 97 | + |
| 98 | + # @import "foo/bar"; instead of @import "foo/_bar.scss"; |
| 99 | + ImportPath: |
| 100 | + enabled: true |
| 101 | + leading_underscore: false |
| 102 | + filename_extension: false |
| 103 | + |
| 104 | + # Always use 2 spaces for indentation |
| 105 | + # If you use Sublime Text, add "tab_size": 2 to your settings to ensure that |
| 106 | + Indentation: |
| 107 | + enabled: true |
| 108 | + allow_non_nested_indentation: false |
| 109 | + character: space |
| 110 | + width: 2 |
| 111 | + |
| 112 | + # margin: 0.5em; instead of margin: .5em; |
| 113 | + LeadingZero: |
| 114 | + enabled: true |
| 115 | + style: include_zero |
| 116 | + |
| 117 | + # Warns when you have duplicate selectors in a style sheet and enforces nesting e.g. |
| 118 | + MergeableSelector: |
| 119 | + enabled: true |
| 120 | + force_nesting: true |
| 121 | + |
| 122 | + # Function, mixin, variable and placeholder names should be all lowercase & hyphenated |
| 123 | + # TODO |
| 124 | + NameFormat: |
| 125 | + enabled: true |
| 126 | + allow_leading_underscore: true |
| 127 | + convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern |
| 128 | + |
| 129 | + # Don't nest more than 4 levels deep |
| 130 | + NestingDepth: |
| 131 | + enabled: true |
| 132 | + max_depth: 4 |
| 133 | + ignore_parent_selectors: false |
| 134 | + |
| 135 | + # Always use placeholder selectors in @extend |
| 136 | + # DISABLED because sometimes we need to extend classes |
| 137 | + PlaceholderInExtend: |
| 138 | + enabled: false |
| 139 | + |
| 140 | + # Limit the number of properties in a rule set |
| 141 | + # DISABLED because we need lots of properties in some rule sets (e.g. buttons) |
| 142 | + PropertyCount: |
| 143 | + enabled: false |
| 144 | + include_nested: false |
| 145 | + max_properties: 10 |
| 146 | + |
| 147 | + # Enforces sorting of properties in a strict order |
| 148 | + # DISABLED for now |
| 149 | + PropertySortOrder: |
| 150 | + enabled: false |
| 151 | + ignore_unspecified: false |
| 152 | + min_properties: 2 |
| 153 | + separate_groups: false |
| 154 | + |
| 155 | + # Check spelling of properties |
| 156 | + # Add extra properties to the extra_properties white list as needed |
| 157 | + PropertySpelling: |
| 158 | + enabled: true |
| 159 | + extra_properties: [] |
| 160 | + |
| 161 | + # Configure which units are allowed for property values |
| 162 | + PropertyUnits: |
| 163 | + enabled: true |
| 164 | + global: [ |
| 165 | + 'ch', 'em', 'ex', 'rem', # Font-relative lengths |
| 166 | + 'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths |
| 167 | + 'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths |
| 168 | + 'deg', 'grad', 'rad', 'turn', # Angle |
| 169 | + 'ms', 's', # Duration |
| 170 | + 'Hz', 'kHz', # Frequency |
| 171 | + 'dpi', 'dpcm', 'dppx', # Resolution |
| 172 | + '%'] # Other |
| 173 | + properties: |
| 174 | + border: ['px'] |
| 175 | + |
| 176 | + # Avoid qualifying elements in selectors like ul.list, div#thing |
| 177 | + # Only allow stuff like a[href="place"] because we use them all over |
| 178 | + # DISABLED for now but please don't abuse it |
| 179 | + QualifyingElement: |
| 180 | + enabled: false |
| 181 | + allow_element_with_attribute: true |
| 182 | + allow_element_with_class: false |
| 183 | + allow_element_with_id: false |
| 184 | + |
| 185 | + # Don't write selectors with a depth of applicability greater than 2 |
| 186 | + # e.g. .one .two .three { } |
| 187 | + SelectorDepth: |
| 188 | + enabled: true |
| 189 | + max_depth: 4 |
| 190 | + |
| 191 | + # BEM Naming convention for selectors |
| 192 | + SelectorFormat: |
| 193 | + enabled: true |
| 194 | + convention: hyphenated_BEM |
| 195 | + |
| 196 | + # margin: 1px; instead of margin: 1px 1px 1px 1px; |
| 197 | + Shorthand: |
| 198 | + enabled: true |
| 199 | + allowed_shorthands: [1, 2, 3] |
| 200 | + |
| 201 | + # Each property in a rule set should be in its own line |
| 202 | + SingleLinePerProperty: |
| 203 | + enabled: true |
| 204 | + allow_single_line_rule_sets: true |
| 205 | + |
| 206 | + # Each selector should be in its own line |
| 207 | + SingleLinePerSelector: |
| 208 | + enabled: true |
| 209 | + |
| 210 | + # color: rgba(0, 0, 0, 0.1); instead of color: rgba(0,0,0,0.1); |
| 211 | + SpaceAfterComma: |
| 212 | + enabled: true |
| 213 | + |
| 214 | + # margin: 0; instead of margin:0; |
| 215 | + SpaceAfterPropertyColon: |
| 216 | + enabled: true |
| 217 | + style: one_space |
| 218 | + |
| 219 | + # margin: 0; instead of margin : 0; |
| 220 | + SpaceAfterPropertyName: |
| 221 | + enabled: true |
| 222 | + |
| 223 | + # $my-var: 0; instead of $my-var : 0; |
| 224 | + SpaceAfterVariableName: |
| 225 | + enabled: true |
| 226 | + |
| 227 | + # margin: 5px + 5px; instead of margin: 5px+5px; |
| 228 | + SpaceAroundOperator: |
| 229 | + enabled: true |
| 230 | + style: one_space |
| 231 | + |
| 232 | + # Opening braces should be preceded by a single space |
| 233 | + # .list { } instead of .list{ } |
| 234 | + SpaceBeforeBrace: |
| 235 | + enabled: true |
| 236 | + style: space |
| 237 | + allow_single_line_padding: true |
| 238 | + |
| 239 | + # color: rgba(0, 0, 0, 0.1); instead of color: rgba( 0, 0, 0, 0.1 ); |
| 240 | + SpaceBetweenParens: |
| 241 | + enabled: true |
| 242 | + spaces: 0 |
| 243 | + |
| 244 | + # content: 'hello'; instead of content: "hello"; |
| 245 | + StringQuotes: |
| 246 | + enabled: true |
| 247 | + style: single_quotes |
| 248 | + |
| 249 | + # Always add a trailing semicolon without a space before it |
| 250 | + TrailingSemicolon: |
| 251 | + enabled: true |
| 252 | + |
| 253 | + # Reports lines containing trailing whitespace |
| 254 | + TrailingWhitespace: |
| 255 | + enabled: true |
| 256 | + |
| 257 | + # margin: 0.5em; instead of margin: 0.500em; |
| 258 | + TrailingZero: |
| 259 | + enabled: false |
| 260 | + |
| 261 | + # margin: 1em; instead of margin: 1.0em; |
| 262 | + UnnecessaryMantissa: |
| 263 | + enabled: true |
| 264 | + |
| 265 | + # Do not use parent selector references (&) when they would otherwise be unnecessary. |
| 266 | + UnnecessaryParentReference: |
| 267 | + enabled: true |
| 268 | + |
| 269 | + # URLs should not contain protocols or domain names. |
| 270 | + UrlFormat: |
| 271 | + enabled: true |
| 272 | + |
| 273 | + # URLs should always be enclosed within quotes. |
| 274 | + UrlQuotes: |
| 275 | + enabled: true |
| 276 | + |
| 277 | + # Use variables instead of literals for properties |
| 278 | + # DISABLED for now |
| 279 | + VariableForProperty: |
| 280 | + enabled: false |
| 281 | + properties: [] |
| 282 | + |
| 283 | + # Avoid writing vendor prefixes |
| 284 | + # DISABLED for now |
| 285 | + VendorPrefix: |
| 286 | + enabled: false |
| 287 | + identifier_list: base |
| 288 | + additional_identifiers: [] |
| 289 | + excluded_identifiers: [] |
| 290 | + |
| 291 | + # margin: 0; instead of margin: 0px; |
| 292 | + ZeroUnit: |
| 293 | + enabled: true |
| 294 | + |
| 295 | + Compass::*: |
| 296 | + enabled: false |
0 commit comments