Skip to content

Commit fb434cb

Browse files
committed
remove redundant check
1 parent 3354eda commit fb434cb

1 file changed

Lines changed: 16 additions & 18 deletions

File tree

server/src/server.ts

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -741,24 +741,22 @@ async function pullSettings(initial = false) {
741741
return;
742742
}
743743

744-
if (workspaceRoot) {
745-
pathAdapter = new aglint.cli.NodePathAdapter();
746-
fsAdapter = new LSPFileSystemAdapter(documents);
747-
748-
const configResolver = new aglint.cli.ConfigResolver(fsAdapter, pathAdapter, {
749-
presetsRoot: aglint.presetsRoot,
750-
baseConfig: {},
751-
});
752-
753-
linterTree = new aglint.cli.LinterTree(fsAdapter, pathAdapter, {
754-
configFileNames: aglint.cli.CONFIG_FILE_NAMES,
755-
ignoreFileName: aglint.cli.IGNORE_FILE_NAME,
756-
root: workspaceRoot,
757-
}, {
758-
resolve: (p) => configResolver.resolve(p),
759-
isRoot: (p) => configResolver.isRoot(p),
760-
});
761-
}
744+
pathAdapter = new aglint.cli.NodePathAdapter();
745+
fsAdapter = new LSPFileSystemAdapter(documents);
746+
747+
const configResolver = new aglint.cli.ConfigResolver(fsAdapter, pathAdapter, {
748+
presetsRoot: aglint.presetsRoot,
749+
baseConfig: {},
750+
});
751+
752+
linterTree = new aglint.cli.LinterTree(fsAdapter, pathAdapter, {
753+
configFileNames: aglint.cli.CONFIG_FILE_NAMES,
754+
ignoreFileName: aglint.cli.IGNORE_FILE_NAME,
755+
root: workspaceRoot,
756+
}, {
757+
resolve: (p) => configResolver.resolve(p),
758+
isRoot: (p) => configResolver.isRoot(p),
759+
});
762760
}
763761

764762
// If AGLint is disabled, remove status bar problems

0 commit comments

Comments
 (0)