mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 17:41:26 -06:00
Fix types in the boolean trivial lint rule (#44801)
This commit is contained in:
parent
f47ddbc3b0
commit
fdc31baffe
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user