gulp-rb-validate-css
Advanced tools
Comparing version 1.0.0 to 1.0.1
16
index.js
@@ -9,2 +9,4 @@ /*jslint node: true*/ | ||
stripCssComments = require('strip-css-comments'), | ||
ignoreUppercase = false, | ||
ignoreUnderscore = false, | ||
error = false, | ||
@@ -171,3 +173,3 @@ errorBreak = false; | ||
if (prop.toLowerCase() !== prop) { | ||
if (prop.toLowerCase() !== prop && !ignoreUppercase) { | ||
validationError('All CSS code must be written in lower case', r, 'CI-FE-3003', true); | ||
@@ -262,6 +264,6 @@ } | ||
if (rule.toLowerCase() !== rule) { | ||
if (rule.toLowerCase() !== rule && !ignoreUppercase) { | ||
found = true; | ||
validationError('All CSS code must be written in lower case', rule, 'CI-FE-3003', true); | ||
} else if (rule.indexOf('_') > 0) { | ||
} else if (rule.indexOf('_') > 0 && !ignoreUnderscore) { | ||
found = true; | ||
@@ -331,2 +333,10 @@ validationError('CSS classes should be delimited with hyphens (see Bootstrap style)', rule, 'CI-FE-3008', false); | ||
if (options.ignoreUppercase) { | ||
ignoreUppercase = true; | ||
} | ||
if (options.ignoreUnderscore) { | ||
ignoreUnderscore = true; | ||
} | ||
checkNames(nocomments); | ||
@@ -333,0 +343,0 @@ |
{ | ||
"name": "gulp-rb-validate-css", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Gulp plugin to check CSS files according to web frontend guidelines", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -73,2 +73,10 @@ #Installation | ||
Set to false to deactivate check of !important. | ||
Set to false to deactivate check of !important. | ||
#### ignoreUppercase: Boolean (Default: false) | ||
Set to true to deactivate check of upper case code. | ||
#### ignoreUnderscore: Boolean (Default: false) | ||
Set to true to deactivate check of underscore delimiters. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13477
306
81