Skip to content

Instantly share code, notes, and snippets.

@dohoons
Last active May 8, 2018 04:16
Show Gist options
  • Save dohoons/e6d46994f13977f84bc093d63d353414 to your computer and use it in GitHub Desktop.
Save dohoons/e6d46994f13977f84bc093d63d353414 to your computer and use it in GitHub Desktop.
style lint
{
"rules": {
"color-no-invalid-hex": true,
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
}
],
"function-calc-no-unspaced-operator": true,
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"property-no-unknown": true,
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-element-no-unknown": true,
"string-no-newline": true,
"unit-no-unknown": true,
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-closing-brace-space-before": "always-single-line",
"block-opening-brace-space-after": "always-single-line",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-hex-length": "short",
"comment-whitespace-inside": "always",
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 5,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "never",
"function-comma-space-before": "never",
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-whitespace-after": "always",
"length-zero-no-unit": true,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-case": "lower",
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"number-leading-zero": "never",
"property-case": "lower",
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-descendant-combinator-no-non-space": true,
"selector-list-comma-newline-after": "always-multi-line",
"selector-list-comma-space-before": "never",
"selector-max-empty-lines": 0,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-type-case": "lower",
"unit-case": "lower",
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "never-single-line",
"value-list-comma-space-before": "never",
"value-list-max-empty-lines": 0
}
}
/* stylelint-disable */
.some {}
var gulp = require('gulp');
var postcss = require('gulp-postcss');
var reporter = require('postcss-reporter');
var syntax_scss = require('postcss-scss');
var stylelint = require('stylelint');
gulp.task("scss-lint", function () {
var processors = [
stylelint(require('./.stylelintrc.json')),
reporter({
clearMessages: true,
throwError: true
})
];
return gulp.src([
'./src/scss/*.scss',
'./src/scss/**/*.scss',
'!./src/scss/**/_com.scss',
'!./src/scss/**/_reset.scss',
'!./src/scss/vendors/**'
])
.pipe(postcss(processors, { syntax: syntax_scss }));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment