Skip to content

Commit 9e2f965

Browse files
authored
lint fixes (#3)
1 parent 409b23f commit 9e2f965

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/autocomplete/content-assist.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,7 @@ function computeSuggestions(tokens: IToken[]): ComputeResult {
738738
const filteredExtra = extra.filter(
739739
(s) => !isImplicitStatementPath(s.ruleStack, IMPLICIT_RULES),
740740
)
741-
const extraEffective =
742-
filteredExtra.length > 0 ? filteredExtra : extra
741+
const extraEffective = filteredExtra.length > 0 ? filteredExtra : extra
743742
const seen = new Set(result.map((t) => t.name))
744743
for (const s of extraEffective) {
745744
if (!seen.has(s.nextTokenType.name)) {

src/parser/visitor.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3783,17 +3783,14 @@ class QuestDBVisitor extends BaseVisitor {
37833783
return this.visit(ctx.qualifiedName) as AST.QualifiedName
37843784
}
37853785

3786-
tableNameOrString(
3787-
ctx: TableNameOrStringCstChildren,
3788-
): AST.QualifiedName {
3786+
tableNameOrString(ctx: TableNameOrStringCstChildren): AST.QualifiedName {
37893787
if (ctx.StringLiteral) {
37903788
return {
37913789
type: "qualifiedName",
37923790
parts: [ctx.StringLiteral[0].image.slice(1, -1)],
37933791
}
37943792
}
3795-
if (ctx.tableName)
3796-
return this.visit(ctx.tableName) as AST.QualifiedName
3793+
if (ctx.tableName) return this.visit(ctx.tableName) as AST.QualifiedName
37973794
return { type: "qualifiedName", parts: [] }
37983795
}
37993796

tests/docs-autocomplete.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ function autocompleteWalkthrough(
317317
.getSuggestions(prefix, prefix.length)
318318
.map((s) => s.label)
319319

320-
let found = false
320+
let found: boolean
321321
let expectedLabel: string
322322

323323
if (tokenType === "Identifier" || tokenType === "QuotedIdentifier") {

0 commit comments

Comments
 (0)