diff options
Diffstat (limited to 'app/assets/javascripts/merge_conflicts')
5 files changed, 22 insertions, 7 deletions
diff --git a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js index 338fbd9078a..6eaabbb3519 100644 --- a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js +++ b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.js @@ -1,9 +1,12 @@ -/* eslint-disable no-param-reassign */ +// This is a true violation of @gitlab/no-runtime-template-compiler, as it relies on +// app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml +// for its template. +/* eslint-disable no-param-reassign, @gitlab/no-runtime-template-compiler */ -import Vue from 'vue'; import { debounce } from 'lodash'; -import axios from '~/lib/utils/axios_utils'; +import Vue from 'vue'; import { deprecatedCreateFlash as flash } from '~/flash'; +import axios from '~/lib/utils/axios_utils'; import { __ } from '~/locale'; ((global) => { @@ -90,9 +93,11 @@ import { __ } from '~/locale'; this.saved = true; // This probably be better placed in the data provider + /* eslint-disable vue/no-mutating-props */ this.file.content = this.editor.getValue(); this.file.resolveEditChanged = this.file.content !== this.originalContent; this.file.promptDiscardConfirmation = false; + /* eslint-enable vue/no-mutating-props */ }, resetEditorContent() { if (this.fileLoaded) { diff --git a/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js b/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js index bc926cb9155..47214e288ae 100644 --- a/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js +++ b/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.js @@ -1,4 +1,7 @@ -/* eslint-disable no-param-reassign */ +// This is a true violation of @gitlab/no-runtime-template-compiler, as it relies on +// app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml +// for its template. +/* eslint-disable no-param-reassign, @gitlab/no-runtime-template-compiler */ import Vue from 'vue'; import actionsMixin from '../mixins/line_conflict_actions'; diff --git a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js index bb306e74825..1d5946cd78a 100644 --- a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js +++ b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.js @@ -15,6 +15,9 @@ import utilsMixin from '../mixins/line_conflict_utils'; required: true, }, }, + // This is a true violation of @gitlab/no-runtime-template-compiler, as it + // has a template string. + // eslint-disable-next-line @gitlab/no-runtime-template-compiler template: ` <table class="diff-wrap-lines code js-syntax-highlight"> <tr class="line_holder parallel" v-for="section in file.parallelLines"> diff --git a/app/assets/javascripts/merge_conflicts/merge_conflict_store.js b/app/assets/javascripts/merge_conflicts/merge_conflict_store.js index 693f0b619a8..fb3444262ea 100644 --- a/app/assets/javascripts/merge_conflicts/merge_conflict_store.js +++ b/app/assets/javascripts/merge_conflicts/merge_conflict_store.js @@ -1,8 +1,8 @@ /* eslint-disable no-param-reassign, babel/camelcase, no-nested-ternary, no-continue */ import $ from 'jquery'; -import Vue from 'vue'; import Cookies from 'js-cookie'; +import Vue from 'vue'; import { s__ } from '~/locale'; ((global) => { diff --git a/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js b/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js index 229f6f3e339..e3972b8b574 100644 --- a/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js +++ b/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js @@ -1,15 +1,19 @@ +// This is a true violation of @gitlab/no-runtime-template-compiler, as it +// relies on app/views/projects/merge_requests/conflicts/show.html.haml for its +// template. +/* eslint-disable @gitlab/no-runtime-template-compiler */ import $ from 'jquery'; import Vue from 'vue'; +import { __ } from '~/locale'; import FileIcon from '~/vue_shared/components/file_icon.vue'; import { deprecatedCreateFlash as createFlash } from '../flash'; import initIssuableSidebar from '../init_issuable_sidebar'; import './merge_conflict_store'; +import syntaxHighlight from '../syntax_highlight'; import MergeConflictsService from './merge_conflict_service'; import './components/diff_file_editor'; import './components/inline_conflict_lines'; import './components/parallel_conflict_lines'; -import syntaxHighlight from '../syntax_highlight'; -import { __ } from '~/locale'; export default function initMergeConflicts() { const INTERACTIVE_RESOLVE_MODE = 'interactive'; |