Skip to content

Instantly share code, notes, and snippets.

@visioncan
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save visioncan/306ce87ab5ab83533de5 to your computer and use it in GitHub Desktop.
Save visioncan/306ce87ab5ab83533de5 to your computer and use it in GitHub Desktop.
scss-lint 設定
# Default application configuration that all configurations inherit from.
scss_files: "sass/**/*.scss"
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
# Border 使用 0 不使用 none
BorderZero:
enabled: false
# 是否可使用顏色名字 ex: white 使用 #fff 取代
ColorKeyword:
enabled: false
# 只使用雙反斜 // 註解
Comment:
enabled: false
DebugStatement:
enabled: true
#宣告排序,@extends > @includes without @content > properties > @includes with @content
DeclarationOrder:
enabled: true
DuplicateProperty:
enabled: true
ElsePlacement:
enabled: true
style: same_line # or 'new_line'
# ???
EmptyLineBetweenBlocks:
enabled: false
ignore_single_line_blocks: true
EmptyRule:
enabled: true
FinalNewline:
enabled: true
present: true
HexLength:
enabled: true
style: short # or 'long'
# 色碼大小寫
HexNotation:
enabled: false
style: lowercase # or 'uppercase'
HexValidation:
enabled: true
# id 帶有無關的選擇器
IdWithExtraneousSelector:
enabled: true
ImportPath:
enabled: true
leading_underscore: false
filename_extension: false
# 縮排
Indentation:
enabled: true
character: space # or 'tab'
width: 4
LeadingZero:
enabled: true
style: exclude_zero # or 'include_zero'
# 複合選擇器 ex: .btn.blue
MergeableSelector:
enabled: false
force_nesting: true
NameFormat:
enabled: true
convention: hyphenated_lowercase # or 'BEM', or a regex pattern
#巢狀階層深度
NestingDepth:
enabled: true
max_depth: 3
PlaceholderInExtend:
enabled: true
# 樣式屬性排序
PropertySortOrder:
enabled: false
ignore_unspecified: false
PropertySpelling:
enabled: true
extra_properties: []
# 元素帶 id 或 class 樣式的 selector
QualifyingElement:
enabled: true
allow_element_with_attribute: false
allow_element_with_class: false
allow_element_with_id: false
# 選擇器深度
SelectorDepth:
enabled: false
max_depth: 3
SelectorFormat:
enabled: true
convention: hyphenated_lowercase # or 'BEM', or 'snake_case', or 'camel_case', or a regex pattern
# 建議較短的樣式值
Shorthand:
enabled: true
SingleLinePerProperty:
enabled: true
allow_single_line_rule_sets: true
SingleLinePerSelector:
enabled: true
SpaceAfterComma:
enabled: true
# 樣式屬性 : 冒號後加空白
SpaceAfterPropertyColon:
enabled: true
style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
SpaceAfterPropertyName:
enabled: true
# { 前大括號前加空白
SpaceBeforeBrace:
enabled: true
style: space
allow_single_line_padding: false
SpaceBetweenParens:
enabled: true
spaces: 0
# 字串使用單 or 雙引號
StringQuotes:
enabled: true
style: double_quotes # or single_quotes
# ; 分號作結尾不加空白
TrailingSemicolon:
enabled: true
TrailingZero:
enabled: false
UnnecessaryMantissa:
enabled: true
UnnecessaryParentReference:
enabled: true
UrlFormat:
enabled: true
# url 是否要加單引號
UrlQuotes:
enabled: false
VendorPrefixes:
enabled: true
identifier_list: base
include: []
exclude: []
# 值 0 是否加單位
ZeroUnit:
enabled: true
Compass::*:
enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment