| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1 1 4 3 2 1 1 | 'use strict';
var
tabs = /^(\t)/,
spaces = /^(\s)/;
// checks for extra space when declaring mixins before variables
module.exports = function checkMixinStyle( line ) {
if ( typeof line !== 'string' ) { return; }
// if mixin exists and it has params
if ( line.indexOf('(') !== -1 && line.indexOf('()') === -1 ) {
if ( line.indexOf('( ') === -1 || line.indexOf(' )') === -1) {
return false;
}
else {
return true;
}
}
} |