Skip to content

Commit

Permalink
ESLint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashwat986 committed Sep 8, 2017
1 parent 5960e05 commit ed32a25
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
"__getScopedUrl", "_requestAllPages",
"_props"
]
}]
}],
"import/prefer-default-export": [1, "always"]
}
};
9 changes: 6 additions & 3 deletions src/js/folder_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,21 @@ class FolderModel {

folderNames (node) {
return this.getFolders(node.parent).map((folder) => {
if (folder.model === node.model)
if (folder.model === node.model) {
return null;
}
return folder.model.name;
});
}

updateFolderName (node, name) {
if (!this.isFolder(node))
if (!this.isFolder(node)) {
return false;
}

if (this.folderNames(node).includes(name))
if (this.folderNames(node).includes(name)) {
return false;
}

node.model.name = name;
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/js/router.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Vue from 'vue';
import store from './store';
import VueRouter from 'vue-router';
import store from './store';
import List from './views/list.vue';
import Config from './views/config.vue';

Expand All @@ -21,7 +21,7 @@ const routes = [
}
},
{
path: "/config",
path: '/config',
component: Config
}
];
Expand Down
9 changes: 5 additions & 4 deletions src/js/store/gistux.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export default {
state.folderJSONChanged = true;
},
addFolderToFolderJSON (state, payload) {
const {folderName, node} = payload;
let response = window.folderJSON.addFolder(folderName, node);
const { folderName, node } = payload;
const response = window.folderJSON.addFolder(folderName, node);
state.folderJSONChanged = true;
state.mutationReturnValue = response;
},
folderJSONmoveFile (state, payload) {
const {fileNode, folder} = payload;
const { fileNode, folder } = payload;
window.folderJSON.move(fileNode, folder);
state.folderJSONChanged = true;
},
Expand All @@ -72,8 +72,9 @@ export default {
setGistData (context, data) {
context.commit('setGistData', data);

if (context.getters.gistUXFileName === null)
if (context.getters.gistUXFileName === null) {
throw new NotLoggedInException();
}

if (window.folderJSON.isEmpty()) {
const folderJSONConfigFile = context.getters.folderJSONConfigFile;
Expand Down
2 changes: 1 addition & 1 deletion src/js/util/string.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function objectEqual (obj1, obj2) {
return JSON.stringify(obj1) === JSON.stringify(obj2)
return JSON.stringify(obj1) === JSON.stringify(obj2);
}

0 comments on commit ed32a25

Please sign in to comment.