summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2017-11-27 16:39:28 +1100
committerSimon Knox <psimyn@gmail.com>2017-11-29 00:44:01 +1100
commit82bf8f4d13a8a61988f65f045b091bfc6502e7d7 (patch)
treec19398a2fea1460dea01bad0987ccc013d0d43c8
parent0315803bc6da2185010f5ff6e60d44f6df059960 (diff)
downloadgitlab-ce-diff-note.tar.gz
fix lintdiff-note
-rw-r--r--.eslintrc2
-rw-r--r--app/assets/javascripts/diff_notes/components/diff_note_avatars.vue3
-rw-r--r--spec/javascripts/diff_notes/components/diff_note_avatars_spec.js3
3 files changed, 3 insertions, 5 deletions
diff --git a/.eslintrc b/.eslintrc
index 44ad6a4896c..2d0faf95ed5 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -32,6 +32,6 @@
"import/no-commonjs": "error",
"no-multiple-empty-lines": ["error", { "max": 1 }],
"promise/catch-or-return": "error",
- "no-underscore-dangle": ["error", { "allow": ["__"]}]
+ "no-underscore-dangle": ["error", { "allow": ["__", "n__", "s__"]}]
}
}
diff --git a/app/assets/javascripts/diff_notes/components/diff_note_avatars.vue b/app/assets/javascripts/diff_notes/components/diff_note_avatars.vue
index f341762ef13..8b47a3250aa 100644
--- a/app/assets/javascripts/diff_notes/components/diff_note_avatars.vue
+++ b/app/assets/javascripts/diff_notes/components/diff_note_avatars.vue
@@ -4,7 +4,6 @@
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
-import { n__ } from '~/locale';
export default {
props: {
@@ -73,7 +72,7 @@ export default {
},
extraNotesTitle() {
if (this.discussion) {
- return n__('%d more comment', '%d more comments', this.extraComments);
+ return this.n__('%d more comment', '%d more comments', this.extraComments);
}
return '';
diff --git a/spec/javascripts/diff_notes/components/diff_note_avatars_spec.js b/spec/javascripts/diff_notes/components/diff_note_avatars_spec.js
index ba071e67b53..4d0abe6d183 100644
--- a/spec/javascripts/diff_notes/components/diff_note_avatars_spec.js
+++ b/spec/javascripts/diff_notes/components/diff_note_avatars_spec.js
@@ -5,11 +5,10 @@ import { createNote } from '../mock_data';
describe('diff_note_avatars', () => {
let vm;
- let notes;
let discussion;
beforeEach(() => {
- notes = jasmine.createSpyObj('notes', ['onAddDiffNote']);
+ window.notes = jasmine.createSpyObj('notes', ['onAddDiffNote']);
const Component = Vue.extend(DiffNoteAvatars);
const discussionId = '1234abcd';