Last active
August 29, 2015 14:14
-
-
Save githiro/a371311d5a63c3ddc4ec to your computer and use it in GitHub Desktop.
Gulp: gulp-scss-lint config file
This file contains 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
# Default application configuration that all configurations inherit from. | |
# Linters Explanation: | |
# https://github.com/causes/scss-lint/blob/master/lib/scss_lint/linter/README.md | |
scss_files: "**/*.scss" | |
linters: | |
# !前後のフォーマット | |
BangFormat: | |
enabled: true | |
space_before_bang: true | |
space_after_bang: false | |
# border: 0 or none | |
BorderZero: | |
enabled: true | |
convention: none # or `zero` | |
# color: red などの使用を禁止 | |
ColorKeyword: | |
enabled: true | |
# color propertyのvalueを変数に限定 | |
ColorVariable: | |
enabled: false | |
# /* ~ */形式のコメントを禁止する | |
Comment: | |
enabled: true | |
# @debugの消し忘れを警告する | |
DebugStatement: | |
enabled: true | |
# @extend, @include, propertyの順で強制 | |
DeclarationOrder: | |
enabled: false | |
# セレクタ内で同じpropertyがあったら警告 | |
DuplicateProperty: | |
enabled: false | |
# "} @else {" と書くよう強制 | |
ElsePlacement: | |
enabled: false | |
style: same_line # or 'new_line' | |
# セレクタやインデント後必ず1行開けるように強制 | |
EmptyLineBetweenBlocks: | |
enabled: false | |
ignore_single_line_blocks: true | |
# 中身が空のセレクタを警告 | |
EmptyRule: | |
enabled: true | |
# Sass最終行は1行開ける | |
FinalNewline: | |
enabled: true | |
present: true | |
# HEXの記述スタイル shortの場合は#f00といった書き方を許容 | |
HexLength: | |
enabled: true | |
style: short # or 'long' | |
# HEXの形式指定 lowercaseは小文字のみで記述 | |
HexNotation: | |
enabled: true | |
style: lowercase # or 'uppercase' | |
# HEXのtypoを検出(#ab など) | |
HexValidation: | |
enabled: true | |
# IDセレクタ禁止 | |
IdSelector: | |
enabled: true | |
# !important の使用を禁止 | |
ImportantRule: | |
enabled: false | |
# @import "_foo.scss";ではなく@import "foo";と書かせる | |
ImportPath: | |
enabled: true | |
leading_underscore: false | |
filename_extension: false | |
# インデント | |
Indentation: | |
enabled: true | |
character: space # or 'tab' | |
width: 2 | |
# 小数点の形式 | |
LeadingZero: | |
enabled: true | |
style: include_zero # or 'exclude_zero' | |
# 同じセレクタが出てきたら警告 | |
MergeableSelector: | |
enabled: true | |
force_nesting: true | |
# Functions, mixins, variablesの命名規則 | |
NameFormat: | |
enabled: false | |
allow_leading_underscore: true | |
convention: hyphenated_lowercase # or 'BEM', or a regex pattern | |
# ネスト階層 | |
NestingDepth: | |
enabled: true | |
max_depth: 4 | |
# プレースホルダを@extendで使用させる | |
PlaceholderInExtend: | |
enabled: true | |
# セレクタ内のproperty数上限 | |
PropertyCount: | |
enabled: false | |
include_nested: false | |
max_properties: 10 | |
# propertyの並び順 | |
PropertySortOrder: | |
enabled: false | |
ignore_unspecified: false | |
separate_groups: false | |
# property名スペルミス検出(ベンダープリフィックスは無視、extra_propertiesで個別指定可能) | |
PropertySpelling: | |
enabled: true | |
extra_properties: [] | |
# li.itemなどのtag-qualifyingを禁止 | |
QualifyingElement: | |
enabled: true | |
allow_element_with_attribute: true | |
allow_element_with_class: true | |
allow_element_with_id: false | |
# セレクタの深さ | |
SelectorDepth: | |
enabled: true | |
max_depth: 10 | |
# セレクタの命名規則(NameFormatとは別) | |
SelectorFormat: | |
enabled: true | |
convention: hyphenated_lowercase # or 'BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern | |
# valueの省略形を許可 | |
Shorthand: | |
enabled: true | |
# property: valueのセットを1行づつに制限 | |
SingleLinePerProperty: | |
enabled: true | |
allow_single_line_rule_sets: true | |
# ".error p, p.explanation..."などセレクタの1行記述を許容しない | |
SingleLinePerSelector: | |
enabled: false | |
# カンマの後には必ずスペース | |
SpaceAfterComma: | |
enabled: true | |
# コロンの後には必ずスペース | |
SpaceAfterPropertyColon: | |
enabled: true | |
style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned' | |
# propertyの後には必ずスペース | |
SpaceAfterPropertyName: | |
enabled: true | |
# ブレース({)の前には必ずスペース | |
SpaceBeforeBrace: | |
enabled: true | |
style: space # or 'new_line' | |
allow_single_line_padding: false | |
# braceが入れ子になる時前後にスペースを強制("@include box-shadow( 0 2px 2px rgba( 0, 0, 0, .2 ) );"など) | |
SpaceBetweenParens: | |
enabled: true | |
spaces: 0 | |
# クオートの統一 | |
StringQuotes: | |
enabled: true | |
style: double_quotes # or single_quotes | |
# property後のコロン強制 | |
TrailingSemicolon: | |
enabled: true | |
# 0.500em;などの不要なゼロを禁止 | |
TrailingZero: | |
enabled: false | |
# 1.0em;など不要な小数点を禁止 | |
UnnecessaryMantissa: | |
enabled: true | |
# 不要な箇所での"&"を禁止 | |
UnnecessaryParentReference: | |
enabled: true | |
# URLにプロトコル、ドメイン名が現れるのを禁止 | |
UrlFormat: | |
enabled: true | |
# URLのクオート括りを強制 | |
UrlQuotes: | |
enabled: true | |
# 色指定には変数を強制(propertiesで個別指定可能) | |
VariableForProperty: | |
enabled: false | |
properties: [] | |
# ベンダープリフィックスの直書き禁止 | |
VendorPrefixes: | |
enabled: true | |
identifier_list: base # Name of predefined identifier list to use (base or bourbon) or an array of identifiers | |
include: [] # Identifiers to lint, in addition to the identifier_list | |
exclude: [] # Identifers in the identifier_list to exclude from linting | |
# valueが0の時、単位を付けさせない | |
ZeroUnit: | |
enabled: true | |
# Compassを使える所で使っていなかったら警告 | |
Compass::*: | |
enabled: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment