Fabriquartz/ember-keyboard-service

View on GitHub
addon/services/keyboard.js

Summary

Maintainability
A
2 hrs
Test Coverage

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

        There are no issues that match your filters.

        Category
        Status