Skip to content

Commit 76c2ee2

Browse files
authored
Update typescript-eslint-parser to 21.0.2 (#132)
no-unused-vars is still turned off for ts, tsx waiting for eslint/typescript-eslint-parser#558
1 parent 46549ee commit 76c2ee2

File tree

6 files changed

+31
-38
lines changed

6 files changed

+31
-38
lines changed

app/appshell/app-menu.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint no-undef:0 */
22
/* tslint:disable:no-empty-interface */
3-
/* globals Electron, process */
3+
/* globals process */
44

55
interface MenuItemOptions extends Electron.MenuItemConstructorOptions {}
66

app/cache.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* tslint:disable:no-empty-interface */
2-
/* globals Electron */
32

43
export type BrowserWindows = Electron.BrowserWindow[];
54
export interface MenuItemOptions extends Electron.MenuItemConstructorOptions {}

app/shared.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* tslint:disable:no-empty-interface */
2-
/* globals Electron */
32

43
export type BrowserWindows = Electron.BrowserWindow[];
54
export interface MenuItemOptions extends Electron.MenuItemConstructorOptions {}

npm-shrinkwrap.json

+9-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"tar": "2.2.1",
145145
"tslint": "5.9.1",
146146
"typescript": "~3.1.6",
147-
"typescript-eslint-parser": "^21.0.1",
147+
"typescript-eslint-parser": "^21.0.2",
148148
"webpack": "2.4.1",
149149
"xmldoc": "0.1.2"
150150
}

src/project/FileTreeView.tsx

+20-18
Original file line numberDiff line numberDiff line change
@@ -707,11 +707,13 @@ function _buildDirsFirstComparator(contents) {
707707

708708
if (!aIsFile && bIsFile) {
709709
return -1;
710-
} else if (aIsFile && !bIsFile) {
710+
}
711+
712+
if (aIsFile && !bIsFile) {
711713
return 1;
712-
} else {
713-
return FileUtils.compareFilenames(a, b);
714714
}
715+
716+
return FileUtils.compareFilenames(a, b);
715717
}
716718
return _dirsFirstCompare;
717719
}
@@ -728,9 +730,9 @@ function _buildDirsFirstComparator(contents) {
728730
function _sortDirectoryContents(contents, dirsFirst) {
729731
if (dirsFirst) {
730732
return contents.keySeq().sort(_buildDirsFirstComparator(contents));
731-
} else {
732-
return contents.keySeq().sort(FileUtils.compareFilenames);
733733
}
734+
735+
return contents.keySeq().sort(FileUtils.compareFilenames);
734736
}
735737

736738
/**
@@ -1001,20 +1003,20 @@ class DirectoryContents extends React.Component<IDirectoryContentsProps, {}> {
10011003
forceRender={self.props.forceRender}
10021004
platform={self.props.platform}
10031005
key={name}></WithContextSettable>;
1004-
} else {
1005-
const WithContextSettable = withContextSettable(DirectoryNode);
1006-
return <WithContextSettable
1007-
depth={self.props.depth}
1008-
parentPath={self.props.parentPath}
1009-
name={name}
1010-
entry={entry}
1011-
actions={self.props.actions}
1012-
extensions={self.props.extensions}
1013-
sortDirectoriesFirst={self.props.sortDirectoriesFirst}
1014-
forceRender={self.props.forceRender}
1015-
platform={self.props.platform}
1016-
key={name}></WithContextSettable>;
10171006
}
1007+
1008+
const WithContextSettable = withContextSettable(DirectoryNode);
1009+
return <WithContextSettable
1010+
depth={self.props.depth}
1011+
parentPath={self.props.parentPath}
1012+
name={name}
1013+
entry={entry}
1014+
actions={self.props.actions}
1015+
extensions={self.props.extensions}
1016+
sortDirectoriesFirst={self.props.sortDirectoriesFirst}
1017+
forceRender={self.props.forceRender}
1018+
platform={self.props.platform}
1019+
key={name}></WithContextSettable>;
10181020
}.bind(this)).toArray();
10191021

10201022
return <ul {...ulProps}>{children}</ul>;

0 commit comments

Comments
 (0)