/* eslint-disable ember/no-computed-properties-in-native-classes, ember/classic-decorator-no-classic-methods */
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import Component from '@ember/component';

export default class ClassFieldDescription extends Component {
  @service
  legacyModuleMappings;

  @computed('field.{name,class}')
  get hasImportExample() {
    return this.legacyModuleMappings.hasFunctionMapping(
      this.get('field.name'),
      this.get('field.class')
    );
  }

  /**
   * Callback for updating the anchor with the field name that was clicked by a user.
   *
   * @method updateAnchor
   * @method fieldName String The name representing the field that was clicked.
   */
  updateAnchor() {}
}

import { inject as service } from '@ember/service';
import Component from '@ember/component';
import { tracked } from '@glimmer/tracking';

class Field {
  @tracked name;
  @tracked class;
}

export default class ClassFieldDescription extends Component {
  @service
  legacyModuleMappings;

  field = new Field();

  get hasImportExample() {
    return this.legacyModuleMappings.hasFunctionMapping(
      this.field.name,
      this.field.class
    );
  }

  /**
   * Callback for updating the anchor with the field name that was clicked by a user.
   *
   * @method updateAnchor
   * @method fieldName String The name representing the field that was clicked.
   */
  updateAnchor() {}
}

Fix linting error (#775)