From 722634ac7c22bf30ca5591dad540ea5e4c8dad81 Mon Sep 17 00:00:00 2001 From: xavijam Date: Thu, 14 Jan 2016 19:09:08 +0100 Subject: [PATCH] Adding HoundCI --- .hound.yml | 7 ++ .scss-lint.yml | 182 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 189 insertions(+) create mode 100644 .hound.yml create mode 100644 .scss-lint.yml diff --git a/.hound.yml b/.hound.yml new file mode 100644 index 0000000..a36dade --- /dev/null +++ b/.hound.yml @@ -0,0 +1,7 @@ +scss: + enabled: true + config_file: .scss-lint.yml +ruby: + enabled: false +javascript: + enabled: false diff --git a/.scss-lint.yml b/.scss-lint.yml new file mode 100644 index 0000000..16a64f1 --- /dev/null +++ b/.scss-lint.yml @@ -0,0 +1,182 @@ +scss_files: 'src/scss/**/*.scss' +exclude: + - 'src/scss/utilities/normalize.scss' +linters: + BangFormat: + enabled: true + space_before_bang: true + space_after_bang: false + BemDepthf: + enabled: true + max_elements: 3 + BorderZero: + enabled: false + convention: zero + ColorKeyword: + enabled: true + severity: warning + ColorVariable: + enabled: false + severity: warning + Comment: + enabled: false + Compass::PropertyWithMixin: + enabled: false + DebugStatement: + enabled: true + DeclarationOrder: + enabled: true + DisableLinterReason: + enabled: false + DuplicateProperty: + enabled: true + ElsePlacement: + enabled: true + style: same_line + EmptyLineBetweenBlocks: + enabled: false + EmptyRule: + enabled: true + FinalNewline: + enabled: true + present: true + HexLength: + enabled: true + style: short + HexNotation: + enabled: true + style: uppercase + HexValidation: + enabled: true + IdSelector: + enabled: true + ImportantRule: + enabled: true + ImportPath: + enabled: true + leading_underscore: false + filename_extension: false + Indentation: + enabled: true + allow_non_nested_indentation: false + character: space + width: 2 + severity: warning + LeadingZero: + enabled: true + style: include_zero + MergeableSelector: + enabled: true + force_nesting: false + NameFormat: + enabled: true + # Valid cases + # - hello + # - helloMates + # - hello-buddy + # - hello-buddyOne + convention: '([a-z]*)([A-Z]+[a-z]*)*-{0,2}([a-z]([a-z]*[A-Z]*[a-z]*))(\.[a-z]+-[a-z]*[A-Z]*[a-z]*)?(:.*)*' + NestingDepth: + enabled: true + max_depth: 3 + severity: warning + PlaceholderInExtend: + enabled: false + PropertyCount: + enabled: true + include_nested: false + max_properties: 18 + severity: warning + PropertySortOrder: + enabled: true + order: smacss + ignore_unspecified: true + severity: warning + separate_groups: false + PropertySpelling: + enabled: true + extra_properties: [] + PropertyUnits: + global: ['em', 'rem', '%', 'px', 's', 'ms', 'vh'] # Allow relative units globally + properties: + border: ['px'] + line-height: ['px', ''] + margin: ['em', 'px', '%'] + QualifyingElement: + enabled: true + allow_element_with_attribute: true + allow_element_with_class: false + allow_element_with_id: false + severity: warning + SelectorDepth: + enabled: true + max_depth: 3 + severity: warning + SelectorFormat: + enabled: true + # Valid cases + # - 0..100% + # - i | em | strong | div | span | ... + # - CDB-Logo + # - CDB-LogoWadus + # - CDB-Logo--cartofante + # - CDB-LogoWadus--cartofante + # - CDB-Logo--cartofantePleased + # - CDB-Logo--cartofanteURL + # - CDB-Logo-oh + # - CDB-Logo-oh:hover + # - CDB-Logo:after + # - CDB-Logo.is-state + convention: '([0-9]+%)|([a-z]+(:.*)*)|CDB-([A-Z]+[a-z]*)([A-Z]+[a-z]*)*-{0,2}([a-z]([a-z]*[A-Z]*[a-z]*))(\.[a-z]+-[a-z]*[A-Z]*[a-z]*)?(:.*)*' + ignored_types: ['id'] + Shorthand: + enabled: true + severity: warning + SingleLinePerProperty: + enabled: true + allow_single_line_rule_sets: false + SingleLinePerSelector: + enabled: true + SpaceAfterComma: + enabled: true + SpaceAfterPropertyColon: + enabled: true + style: one_space + SpaceAfterPropertyName: + enabled: true + SpaceAfterVariableName: + enabled: true + SpaceAroundOperator: + enabled: true + style: one_space + SpaceBeforeBrace: + enabled: true + style: space + allow_single_line_padding: false + SpaceBetweenParens: + enabled: true + spaces: 0 + StringQuotes: + enabled: true + style: single_quotes + TrailingSemicolon: + enabled: true + severity: warning + TrailingZero: + enabled: true + UnnecessaryMantissa: + enabled: true + UnnecessaryParentReference: + enabled: true + UrlFormat: + enabled: true + UrlQuotes: + enabled: true + VariableForProperty: + enabled: false + properties: [] + VendorPrefixes: + enabled: false + ZeroUnit: + enabled: true + severity: warning