<commit_before>import Mixin from '@ember/object/mixin';
import { action } from '@ember/object';

export default Mixin.create({
  didReceiveAttrs() {
    this._super(...arguments);
    this.set('showErrorsFor', []);
  },
  showErrorsFor: [],

  @action
  addErrorDisplayFor(field) {
    this.showErrorsFor.pushObject(field);
  },

  @action
  addErrorDisplaysFor(fields) {
    this.showErrorsFor.pushObjects(fields);
  },

  @action
  removeErrorDisplayFor(field) {
    this.showErrorsFor.removeObject(field);
  },

  @action
  clearErrorDisplay() {
    this.set('showErrorsFor', []);
  },
});<commit_msg>initialize errors array in init() lifecycle hook to fix linter error.<commit_after>import Mixin from '@ember/object/mixin';
import { action } from '@ember/object';

export default Mixin.create({
  showErrorsFor: null,

  init() {
    this._super(...arguments);
    this.set('showErrorsFor', []);
  },

  didReceiveAttrs() {
    this._super(...arguments);
    this.set('showErrorsFor', []);
  },

  @action
  addErrorDisplayFor(field) {
    this.showErrorsFor.pushObject(field);
  },

  @action
  addErrorDisplaysFor(fields) {
    this.showErrorsFor.pushObjects(fields);
  },

  @action
  removeErrorDisplayFor(field) {
    this.showErrorsFor.removeObject(field);
  },

  @action
  clearErrorDisplay() {
    this.set('showErrorsFor', []);
  },
});
{'fraction_non_alphanumeric': 0.15703703703703703, 'fraction_numerical': 0.0, 'mean_word_length': 3.985239852398524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3003153', 'n_tokens_mistral': 454, 'n_tokens_neox': 439, 'n_words': 68}