Skip to content

Commit

Permalink
fix: Eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Mar 18, 2024
1 parent b9f655a commit c63352b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/detectors/typeChecker/FileLinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,15 @@ export default class FileLinter {
fnArgumentNode = node.arguments.find((arg: ts.Expression) =>
arg.kind === ts.SyntaxKind.Identifier && arg.getText() === settings.fnArgument);
}
return fnArgumentNode || null;
return fnArgumentNode ?? null;
}

checkLibInitCall(node: ts.CallExpression) {
const nodeExp = node.expression as ts.PropertyAccessExpression;
const {symbol} = this.#checker.getTypeAtLocation(nodeExp);
// TS parser uses some intermediate types that are not available as definitions.
// In this case SymbolObject which is a ts.Symbol + ts.Node and that's

Check failure on line 256 in src/detectors/typeChecker/FileLinter.ts

View workflow job for this annotation

GitHub Actions / General checks, tests and coverage reporting

Trailing spaces not allowed
// why we need these ugly type castings
const importDeclaration =
((((symbol as unknown) as ts.Node)?.parent?.parent as unknown) as ts.Symbol)?.getEscapedName() as string;

Expand Down

0 comments on commit c63352b

Please sign in to comment.