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

Statements: 100% (13 / 13)      Branches: 81.25% (13 / 16)      Functions: 100% (1 / 1)      Lines: 100% (12 / 12)      Ignored: none     

All files » stylus-lint/src/checks/ » checkForExtendStyle.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23      1 7   4 2 1   1 1     2 2 1   1 1      
'use strict';
 
// check for specified extend preference
module.exports = function checkExtendStyle( line, pref ) {
    if ( typeof line !== 'string' || typeof pref === 'undefined' ) { return; }
 
    if ( pref === '@extends' ) {
        if ( line.indexOf('@extend ') !== -1 ) {
            return false;
        }
        else Eif ( line.indexOf('@extends ') !== -1 ) {
            return true;
        }
    }
    else Eif ( pref === '@extend' ) {
        if ( line.indexOf('@extends ') !== -1 ) {
            return false;
        }
        else Eif ( line.indexOf('@extend ') !== -1 ) {
            return true;
        }
    }
}