Browse Source

Integrate grunt-scss-lint

pull/613/merge^2
Daijiro Wachi 11 years ago
parent
commit
93e2ff3952
  1. 122
      .scss-lint.yml
  2. 10
      Gruntfile.js
  3. 1
      package.json

122
.scss-lint.yml

@ -0,0 +1,122 @@
# Default application configuration that all configurations inherit from.
linters:
BorderZero:
enabled: true
CapitalizationInSelector:
enabled: true
ColorKeyword:
enabled: true
Comment:
enabled: true
DebugStatement:
enabled: true
DeclarationOrder:
enabled: true
DuplicateProperty:
enabled: true
EmptyLineBetweenBlocks:
enabled: true
ignore_single_line_blocks: true
EmptyRule:
enabled: true
FinalNewline:
enabled: true
present: true
HexLength:
enabled: true
style: short # or 'long'
HexNotation:
enabled: true
style: lowercase # or 'uppercase'
HexValidation:
enabled: true
IdWithExtraneousSelector:
enabled: true
Indentation:
enabled: true
width: 2
LeadingZero:
enabled: true
style: exclude_zero # or 'include_zero'
MergeableSelector:
enabled: true
force_nesting: true
NameFormat:
enabled: true
convention: hyphenated_lowercase # or 'BEM', or a regex pattern
PlaceholderInExtend:
enabled: true
PropertySortOrder:
enabled: true
PropertySpelling:
enabled: true
extra_properties: []
SelectorDepth:
enabled: true
max_depth: 3
Shorthand:
enabled: true
SingleLinePerSelector:
enabled: true
SpaceAfterComma:
enabled: true
SpaceAfterPropertyColon:
enabled: true
SpaceAfterPropertyName:
enabled: true
SpaceBeforeBrace:
enabled: true
allow_single_line_padding: false
SpaceBetweenParens:
enabled: true
spaces: 0
StringQuotes:
enabled: true
style: single_quotes # or double_quotes
TrailingSemicolonAfterPropertyValue:
enabled: true
UnnecessaryMantissa:
enabled: true
UrlFormat:
enabled: true
UrlQuotes:
enabled: true
ZeroUnit:
enabled: true
Compass::*:
enabled: false

10
Gruntfile.js

@ -76,6 +76,14 @@ module.exports = function(grunt) {
} }
}, },
scsslint: {
scss: 'sass/*.scss',
options: {
config: '.scss-lint.yml',
colorizeOutput: true
}
},
csscomb: { csscomb: {
options: { options: {
config: 'sass/.csscomb.json' config: 'sass/.csscomb.json'
@ -253,7 +261,7 @@ module.exports = function(grunt) {
grunt.registerTask('validate-html', ['jekyll', 'validation']); grunt.registerTask('validate-html', ['jekyll', 'validation']);
grunt.registerTask('build', ['dist']); grunt.registerTask('build', ['dist']);
grunt.registerTask('default', ['dist']); grunt.registerTask('default', ['dist']);
grunt.registerTask('test', ['dist', 'csslint', 'jshint', 'jscs', 'validate-html']); grunt.registerTask('test', ['dist', 'scsslint', 'csslint', 'jshint', 'jscs', 'validate-html']);
grunt.registerTask('build-ratchicons-data', generateRatchiconsData); grunt.registerTask('build-ratchicons-data', generateRatchiconsData);

1
package.json

@ -40,6 +40,7 @@
"grunt-html-validation": "~0.1.17", "grunt-html-validation": "~0.1.17",
"grunt-jekyll": "~0.4.2", "grunt-jekyll": "~0.4.2",
"grunt-jscs-checker": "~0.4.4", "grunt-jscs-checker": "~0.4.4",
"grunt-scss-lint": "^0.1.11",
"grunt-sed": "~0.1.1", "grunt-sed": "~0.1.1",
"load-grunt-tasks": "~0.4.0", "load-grunt-tasks": "~0.4.0",
"time-grunt": "~0.3.1" "time-grunt": "~0.3.1"

Loading…
Cancel
Save