Skip to content

Commit d9e12ce

Browse files
committed
linting
1 parent 9f45a29 commit d9e12ce

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/vs/workbench/contrib/files/browser/explorerService.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { Event } from 'vs/base/common/event';
6+
import { Event, Emitter } from 'vs/base/common/event';
77
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
8-
import { DisposableStore, dispose } from 'vs/base/common/lifecycle';
8+
import { DisposableStore, IDisposable, dispose } from 'vs/base/common/lifecycle';
99
import { IFilesConfiguration, ISortOrderConfiguration, SortOrder, LexicographicOptions } from 'vs/workbench/contrib/files/common/files';
1010
import { ExplorerItem, ExplorerModel } from 'vs/workbench/contrib/files/common/explorerModel';
1111
import { URI } from 'vs/base/common/uri';
@@ -25,10 +25,8 @@ import { RunOnceScheduler } from 'vs/base/common/async';
2525
import { IHostService } from 'vs/workbench/services/host/browser/host';
2626
import { IExpression, parse } from 'vs/base/common/glob';
2727
import { mixin, deepClone, equals } from 'vs/base/common/objects';
28-
import { IDisposable } from 'vs/base/common/lifecycle';
2928
import { CachedParsedExpression } from 'vs/workbench/contrib/files/browser/views/explorerViewer';
30-
import { Emitter } from 'vs/base/common/event';
31-
import { relative } from 'path';
29+
import { relative } from 'vs/base/common/path';
3230

3331
export const UNDO_REDO_SOURCE = new UndoRedoSource();
3432

@@ -138,7 +136,7 @@ export class ExplorerService implements IExplorerService {
138136
this.revealExcludeMatcher = new RevealFilter(
139137
contextService, configurationService);
140138
this.disposables.add(this.revealExcludeMatcher);
141-
this.disposables.add(this.revealExcludeMatcher.onDidChange(() => this.refresh()))
139+
this.disposables.add(this.revealExcludeMatcher.onDidChange(() => this.refresh()));
142140
}
143141

144142
get roots(): ExplorerItem[] {
@@ -443,7 +441,7 @@ class RevealFilter implements IDisposable {
443441
let shouldFire = false;
444442
this.contextService.getWorkspace().folders.forEach(folder => {
445443
const configuration = this.configurationService.getValue<IFilesConfiguration>({ resource: folder.uri });
446-
const excludesConfig: IExpression = getRevealExcludes(configuration, true) || Object.create(null)
444+
const excludesConfig: IExpression = getRevealExcludes(configuration, true) || Object.create(null);
447445

448446
if (!shouldFire) {
449447
const cached = this.revealExpressionPerRoot.get(folder.uri.toString());
@@ -469,13 +467,13 @@ class RevealFilter implements IDisposable {
469467
const root = item.root;
470468
let currentItem = item;
471469
// If any parent up to the root matches pattern, do not reveal
472-
while (currentItem != root) {
470+
while (currentItem !== root) {
473471
if (cached.parsed(relative(currentItem.root.resource.path, currentItem.resource.path), currentItem.name, name => !!(currentItem.parent && currentItem.parent.getChild(name)))) {
474472
return false;
475473
}
476474
if (!currentItem.parent) {
477475
return true;
478-
};
476+
}
479477
currentItem = currentItem.parent;
480478
}
481479
return true;

src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,7 @@ function trimCategoryForGroup(category: string, groupId: string): string {
570570
}
571571

572572
export function isExcludeSetting(setting: ISetting): boolean {
573-
return setting.key in
574-
['files.exclude', 'search.exclude', 'files.watcherExclude', 'explorer.autoRevealExclude'];
573+
return ['files.exclude', 'search.exclude', 'files.watcherExclude', 'explorer.autoRevealExclude'].includes(setting.key);
575574
}
576575

577576
function isObjectRenderableSchema({ type }: IJSONSchema): boolean {

0 commit comments

Comments
 (0)