oxc icon indicating copy to clipboard operation
oxc copied to clipboard

oxc/only used in recursion "bad" example doesn't cause an error

Open camc314 opened this issue 6 months ago • 2 comments

In the docs for oxc/only used in recursion, there's the following case:

function f(a: number, b: number): number {
    if (a == 0) {
        return 1
    } else {
        return f(a - 1, b + 1)
    }
}

this doesn't report an error if you run this code against the lint rule 😅

to complete this issue we should make it report the error for this case.

camc314 avatar Aug 10 '24 16:08 camc314