Code coverage report for stylus-lint/src/checks/checkForPlaceholderStyle.js

Statements: 90.91% (10 / 11)      Branches: 90% (9 / 10)      Functions: 100% (1 / 1)      Lines: 90% (9 / 10)      Ignored: none     

All files » stylus-lint/src/checks/ » checkForPlaceholderStyle.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24      1 11051     11050 2       2     11048 172 3     169      
'use strict';
 
// check for specified extend preference
module.exports = function checkPlaceholderStyle( line ) {
    if ( typeof line !== 'string' ) { return; }
 
    // first check if line has an extend
    if ( line.indexOf('@extend ') !== -1 ) {
        Iif ( line.indexOf('@extend $') === -1 ) {
            return false;
        }
        else {
            return true;
        }
    }
    else if ( line.indexOf('@extends ') !== -1 ) {
        if ( line.indexOf('@extends $') === -1 ) {
            return false;
        }
        else {
            return true;
        }
    }
}