Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 076a9bc

Browse files
committed
lint
1 parent 45c098c commit 076a9bc

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/main.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,48 @@ const GitHubFile = require('./github-file')
33

44
function getActivePath (target) {
55
if (!target) {
6-
return atom.project.getPaths()[0];
6+
return atom.project.getPaths()[0]
77
}
88

9-
const treeView = target.closest(".tree-view");
9+
const treeView = target.closest('.tree-view')
1010
if (treeView) {
1111
// called from treeview
12-
const selected = treeView.querySelector(".selected > .list-item > .name, .selected > .name");
12+
const selected = treeView.querySelector('.selected > .list-item > .name, .selected > .name')
1313
if (selected) {
14-
return selected.dataset.path;
14+
return selected.dataset.path
1515
}
16-
return;
16+
return
1717
}
1818

19-
const tab = target.closest(".tab-bar > .tab");
19+
const tab = target.closest('.tab-bar > .tab')
2020
if (tab) {
2121
// called from tab
22-
const title = tab.querySelector(".title");
22+
const title = tab.querySelector('.title')
2323
if (title && title.dataset.path) {
24-
return title.dataset.path;
24+
return title.dataset.path
2525
}
26-
return;
26+
return
2727
}
2828

29-
const paneItem = atom.workspace.getActivePaneItem();
30-
if (paneItem && typeof paneItem.getPath === "function") {
29+
const paneItem = atom.workspace.getActivePaneItem()
30+
if (paneItem && typeof paneItem.getPath === 'function') {
3131
// called from active pane
32-
return paneItem.getPath();
32+
return paneItem.getPath()
3333
}
3434

35-
const textEditor = atom.workspace.getActiveTextEditor();
36-
if (textEditor && typeof textEditor.getPath === "function") {
35+
const textEditor = atom.workspace.getActiveTextEditor()
36+
if (textEditor && typeof textEditor.getPath === 'function') {
3737
// fallback to activeTextEditor if activePaneItem is not a file
38-
return textEditor.getPath();
38+
return textEditor.getPath()
3939
}
4040
}
4141

42-
function pathCommand(func) {
42+
function pathCommand (func) {
4343
return function (e) {
4444
const itemPath = getActivePath(e.target)
4545

4646
if (itemPath) {
47-
func(itemPath);
47+
func(itemPath)
4848
}
4949
}
5050
}

0 commit comments

Comments
 (0)