Fabriquartz/ember-keyboard-service

View on GitHub

Showing 3 of 3 total issues

Function _handleKeyPress has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _handleKeyPress(e) {
    let key = e.key || KEYCODE_TO_KEY_MAP[e.keyCode];
    const listeners = this._listenersForKey(key);

    if (key === '.') {
Severity: Minor
Found in addon/services/keyboard.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

          if (e.altKey   && !options.requireAlt)   { return; }
    Severity: Major
    Found in addon/services/keyboard.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            if (e.shiftKey && !options.requireShift) { return; }
      Severity: Major
      Found in addon/services/keyboard.js - About 30 mins to fix
        Severity
        Category
        Status
        Source
        Language