提交 561f5b6d 编写于 作者: E Eric Amodio

Remove eslint disable -- #101978

上级 ae34596a
......@@ -2533,8 +2533,7 @@ export class CommandCenter {
@command('git.timeline.openDiff', { repository: false })
async timelineOpenDiff(item: TimelineItem, uri: Uri | undefined, _source: string) {
// eslint-disable-next-line eqeqeq
if (uri == null || !GitTimelineItem.is(item)) {
if (uri === undefined || uri === null || !GitTimelineItem.is(item)) {
return undefined;
}
......
......@@ -437,8 +437,7 @@ export class Git {
try {
const networkPath = await new Promise<string>(resolve =>
realpath.native(`${letter}:`, { encoding: 'utf8' }, (err, resolvedPath) =>
// eslint-disable-next-line eqeqeq
resolve(err != null ? undefined : resolvedPath),
resolve(err !== null ? undefined : resolvedPath),
),
);
if (networkPath !== undefined) {
......
......@@ -12,8 +12,9 @@ export namespace Iterables {
): Iterable<TMapped> {
for (const item of source) {
const mapped = predicateMapper(item);
// eslint-disable-next-line eqeqeq
if (mapped != null) { yield mapped; }
if (mapped !== undefined && mapped !== null) {
yield mapped;
}
}
}
......
......@@ -78,9 +78,7 @@ export class ExtHostTimeline implements IExtHostTimeline {
}
const result = await provider.provideTimeline(uri, options, token);
// Intentional == we don't know how a provider will respond
// eslint-disable-next-line eqeqeq
if (result == null) {
if (result === undefined || result === null) {
return undefined;
}
......
......@@ -293,8 +293,7 @@ export class TimelinePane extends ViewPane {
get pageSize() {
let pageSize = this.configurationService.getValue<number | null | undefined>('timeline.pageSize');
// eslint-disable-next-line eqeqeq
if (pageSize == null) {
if (pageSize === undefined || pageSize === null) {
// If we are paging when scrolling, then add an extra item to the end to make sure the "Load more" item is out of view
pageSize = Math.max(20, Math.floor((this.tree.renderHeight / ItemHeight) + (this.pageOnScroll ? 1 : -1)));
}
......@@ -909,8 +908,7 @@ export class TimelinePane extends ViewPane {
}
const item = e.element;
// eslint-disable-next-line eqeqeq
if (item == null) {
if (item === null) {
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册