app/javascript/js/controllers/fields/trix_field_controller.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function uploadFile has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  uploadFile(file, progressCallback, successCallback) {
    const formData = this.createFormData(file)
    const xhr = new XMLHttpRequest()

    xhr.open('POST', this.uploadUrl, true)
Severity: Minor
Found in app/javascript/js/controllers/fields/trix_field_controller.js - About 1 hr to fix

    Function connect has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      connect() {
        if (this.attachmentsDisabledValue) {
          // Remove the attachments button
          this.controllerTarget.querySelector('.trix-button-group--file-tools').remove()
        }
    Severity: Minor
    Found in app/javascript/js/controllers/fields/trix_field_controller.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status