Fix types in the boolean trivial lint rule (#44801)

This commit is contained in:
Orta Therox 2021-06-29 19:53:35 +01:00 committed by GitHub
parent f47ddbc3b0
commit fdc31baffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ export = createRule({
const sourceCodeText = sourceCode.getText();
const isSetOrAssert = (name: string): boolean => name.startsWith("set") || name.startsWith("assert");
const isTrivia = (node: TSESTree.CallExpressionArgument): boolean => {
const isTrivia = (node: TSESTree.Node): boolean => {
if (node.type === AST_NODE_TYPES.Identifier) {
return node.name === "undefined";
}
@ -69,7 +69,7 @@ export = createRule({
return false;
};
const checkArg = (node: TSESTree.CallExpressionArgument): void => {
const checkArg = (node: TSESTree.Node): void => {
if (!isTrivia(node)) {
return;
}