Last active
August 29, 2015 14:10
-
-
Save weshardee/b2a56a4d5f0a6b5c3aaf to your computer and use it in GitHub Desktop.
My SCSS lint preferences
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docs @ https://github.com/causes/scss-lint/blob/master/lib/scss_lint/linter/README.md | |
linters: | |
BorderZero: | |
enabled: false # nerdery - no existing standard for 'none' or '0' | |
CapitalizationInSelector: | |
enabled: false # nerdery - capitalization in camelCase is possible | |
ColorKeyword: | |
enabled: true # nerdery - disallow color keywords | |
Comment: | |
enabled: false # nerdery - no prefrence for '//' or '/* */' comment style | |
DebugStatement: | |
enabled: true # nerdery - no @debug should be left in the code | |
DeclarationOrder: | |
enabled: false # nerdery - no preference on @extend as it's disallowed | |
DuplicateProperty: | |
enabled: true # nerdery - should never have duplicate attributes | |
ElsePlacement: | |
enabled: true | |
style: same_line # nerdery - @else statements should be on the same line as curly braces | |
EmptyLineBetweenBlocks: | |
enabled: true # nerdery - line break between rule blocks is required | |
ignore_single_line_blocks: true # nerdery - except when rules are on a single line | |
EmptyRule: | |
enabled: true # nerdery - no empty rules should exist | |
FinalNewline: | |
enabled: false # nerdery - not a front-end standard | |
present: false # nerdery - still not a front-end standard | |
HexLength: | |
enabled: true # nerdery - always use 6 digit hex | |
style: long # nerdery - always use 6 digit hex | |
HexNotation: | |
enabled: true # nerdery - always use lowercase | |
style: lowercase # nerdery - always use lowercase | |
HexValidation: | |
enabled: true # nerdery - always use valid hex | |
IdWithExtraneousSelector: | |
enabled: true # nerdery - while not technically a standard it's a good practice | |
Indentation: | |
enabled: true # nerdery - use 4 spaces | |
character: space # nerdery - use spaces | |
width: 4 # nerdery - use 4 of them | |
LeadingZero: | |
enabled: false # nerdery - disabled as there is no standards | |
style: false # options - 'include_zero' or 'exclude_zero' | |
MergeableSelector: | |
enabled: true # nerdery - while not technically a standard it's a good practice | |
force_nesting: false # nerdery - never ever enforce nesting | |
NameFormat: | |
enabled: false # nerdery - use nerdery naming standards | |
convention: false # options - 'hyphenated_lowercase' or 'BEM', or a regex pattern | |
PlaceholderInExtend: | |
enabled: false # nerdery - don't use extend so not enabled | |
PropertySortOrder: | |
enabled: true # nerdery - group by similar type | |
order: concentric # nerdery - needs config | |
ignore_unspecified: true # nerdery - ignore any properties not specified in the order | |
PropertySpelling: | |
enabled: true # nerdery - spell properties correctly | |
extra_properties: [] # nerdery - if a property doesn't exist in the linter, specify it here | |
SelectorDepth: | |
enabled: true # nerdery - depth of applicability should be LOW LOW LOW | |
max_depth: 2 # nerdery - normally this would be 1 but we need some scenarios (UserContent, .hlist > *) to work without error | |
SelectorFormat: | |
enabled: true # nerdery - standards use a mix of -, _, and camelCase | |
convention: (\w+)(-\w+)?(_\w+)? # hyphenated_lowercase (default) or snake_case, camel_case, BEM, or regex | |
Shorthand: | |
enabled: false # nerdery - use the longest shorthand, not the shortest shorthand | |
SingleLinePerProperty: | |
enabled: true # nerdery - one property per line | |
allow_single_line_rule_sets: true # nerdery - single line rulesets are ok sometimes | |
SingleLinePerSelector: | |
enabled: true # nerdery - one selector per line | |
SpaceAfterComma: | |
enabled: true # nerdery - while not technically a standard it's a good practice | |
SpaceAfterPropertyColon: | |
enabled: true # nerdery - there should always be a space | |
style: one_space # options - 'one_space' or 'no_space', or 'at_least_one_space', or 'aligned' | |
SpaceAfterPropertyName: | |
enabled: true # nerdery - no space after property name and before colon | |
SpaceBeforeBrace: | |
enabled: true # nerdery - always a space before the opening brace | |
allow_single_line_padding: false # nerdery - don't line up properies on single line rules | |
SpaceBetweenParens: | |
enabled: true # nerdery - no space by parenthesis | |
spaces: 0 # nerdery - 0 spaces | |
StringQuotes: | |
enabled: true # nerdery - enforce string quotes | |
style: double_quotes # nerdery - use double_quotes not single_quotes | |
TrailingSemicolon: | |
enabled: true # nerdery - there should always be a trailing semi-colon | |
UnnecessaryMantissa: | |
enabled: true # nerdery - while not technically a standard it's a good practice | |
UnnecessaryParentReference: | |
enabled: false # nerdery - no preference on parent reference in nesting as it's disallowed | |
UrlFormat: | |
enabled: true # nerdery - urls should never contain protocols | |
UrlQuotes: | |
enabled: true # nerdery - urls should always be quoted | |
ZeroUnit: | |
enabled: true # nerdery - always remove units from 0 values | |
Indentation: | |
severity: warning | |
width: 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment