Commit 51a936fb authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Further eslint fixes

parent 69618e30
import Vue from 'vue';
import Store from './repo_store';
import Flash from '../flash';
import { loadingError } from './repo_helper';
export default class RepoBinaryViewer {
constructor() {
......@@ -45,7 +45,7 @@ export default class RepoBinaryViewer {
this.binaryTypes.png = true;
break;
default:
new Flash('Blob could not be loaded'); // eslint-disable-line no-new
loadingError();
break;
}
},
......
......@@ -13,10 +13,10 @@ export default class RepoEditor {
this.vue.$watch('activeFile.lineNumber', () => {
console.log('cahnged');
});
this.monacoEditor.onMouseUp(this.onMonacoEditorMouseUp);
this.monacoEditor.onMouseUp(RepoEditor.onMonacoEditorMouseUp);
}
onMonacoEditorMouseUp(e) {
static onMonacoEditorMouseUp(e) {
if (e.target.element.className === 'line-numbers') {
location.hash = `L${e.target.position.lineNumber}`;
Store.activeLine = e.target.position.lineNumber;
......
......@@ -24,14 +24,12 @@ const RepoHelper = {
},
blobURLtoParent(url) {
let joined = '';
const split = url.split('/');
split.pop();
const blobIndex = split.indexOf('blob');
if (blobIndex > -1) {
split[blobIndex] = 'tree';
}
joined = split.join('/');
return split.join('/');
},
......@@ -60,10 +58,9 @@ const RepoHelper = {
},
resetBinaryTypes() {
let s = '';
for (s in Store.binaryTypes) {
Store.binaryTypes[s] = false;
}
Object.keys(Store.binaryTypes).forEach((typeKey) => {
Store.binaryTypes[typeKey] = false;
});
},
setActiveFile(file) {
......@@ -160,7 +157,8 @@ const RepoHelper = {
},
// may be tree or file.
getContent(file) {
getContent(treeOrFile) {
let file = treeOrFile;
const loadingData = this.setLoading(true);
Service.getContent()
.then((response) => {
......
......@@ -23,7 +23,7 @@ const RepoService = {
getContent(url) {
if (url) {
return axios.get(url, this.paramsWithRich(url, params));
return axios.get(url, this.paramsWithRich(url, this.params));
}
return axios.get(this.url, this.paramsWithRich(this.url, this.params));
},
......
import Vue from 'vue';
import Service from './repo_service';
import Helper from './repo_helper';
import Vue from 'vue';
import Store from './repo_store';
import RepoPreviousDirectory from './repo_prev_directory';
import RepoFileOptions from './repo_file_options';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment