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

Further eslint fixes

parent 69618e30
import Vue from 'vue'; import Vue from 'vue';
import Store from './repo_store'; import Store from './repo_store';
import Flash from '../flash'; import { loadingError } from './repo_helper';
export default class RepoBinaryViewer { export default class RepoBinaryViewer {
constructor() { constructor() {
...@@ -45,7 +45,7 @@ export default class RepoBinaryViewer { ...@@ -45,7 +45,7 @@ export default class RepoBinaryViewer {
this.binaryTypes.png = true; this.binaryTypes.png = true;
break; break;
default: default:
new Flash('Blob could not be loaded'); // eslint-disable-line no-new loadingError();
break; break;
} }
}, },
......
...@@ -13,10 +13,10 @@ export default class RepoEditor { ...@@ -13,10 +13,10 @@ export default class RepoEditor {
this.vue.$watch('activeFile.lineNumber', () => { this.vue.$watch('activeFile.lineNumber', () => {
console.log('cahnged'); 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') { if (e.target.element.className === 'line-numbers') {
location.hash = `L${e.target.position.lineNumber}`; location.hash = `L${e.target.position.lineNumber}`;
Store.activeLine = e.target.position.lineNumber; Store.activeLine = e.target.position.lineNumber;
......
...@@ -24,14 +24,12 @@ const RepoHelper = { ...@@ -24,14 +24,12 @@ const RepoHelper = {
}, },
blobURLtoParent(url) { blobURLtoParent(url) {
let joined = '';
const split = url.split('/'); const split = url.split('/');
split.pop(); split.pop();
const blobIndex = split.indexOf('blob'); const blobIndex = split.indexOf('blob');
if (blobIndex > -1) { if (blobIndex > -1) {
split[blobIndex] = 'tree'; split[blobIndex] = 'tree';
} }
joined = split.join('/');
return split.join('/'); return split.join('/');
}, },
...@@ -60,10 +58,9 @@ const RepoHelper = { ...@@ -60,10 +58,9 @@ const RepoHelper = {
}, },
resetBinaryTypes() { resetBinaryTypes() {
let s = ''; Object.keys(Store.binaryTypes).forEach((typeKey) => {
for (s in Store.binaryTypes) { Store.binaryTypes[typeKey] = false;
Store.binaryTypes[s] = false; });
}
}, },
setActiveFile(file) { setActiveFile(file) {
...@@ -160,7 +157,8 @@ const RepoHelper = { ...@@ -160,7 +157,8 @@ const RepoHelper = {
}, },
// may be tree or file. // may be tree or file.
getContent(file) { getContent(treeOrFile) {
let file = treeOrFile;
const loadingData = this.setLoading(true); const loadingData = this.setLoading(true);
Service.getContent() Service.getContent()
.then((response) => { .then((response) => {
......
...@@ -23,7 +23,7 @@ const RepoService = { ...@@ -23,7 +23,7 @@ const RepoService = {
getContent(url) { getContent(url) {
if (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)); return axios.get(this.url, this.paramsWithRich(this.url, this.params));
}, },
......
import Vue from 'vue';
import Service from './repo_service'; import Service from './repo_service';
import Helper from './repo_helper'; import Helper from './repo_helper';
import Vue from 'vue';
import Store from './repo_store'; import Store from './repo_store';
import RepoPreviousDirectory from './repo_prev_directory'; import RepoPreviousDirectory from './repo_prev_directory';
import RepoFileOptions from './repo_file_options'; 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