stylint
Version:
A linter for stylus
15 lines (12 loc) • 324 B
JavaScript
;
// check for colons
module.exports = function checkForColon( line, areWeInAHash ) {
if ( typeof areWeInAHash === 'undefined' || typeof line === 'undefined' ) { return; }
// : is allowed in hashes
if ( areWeInAHash === false && line.indexOf(': ') !== -1 ) {
return true;
}
else {
return false;
}
};