# no-caller

> Disallow `arguments.caller` and `arguments.callee`

Reading `arguments.callee` throws a `TypeError` in strict mode, and every ES module and every class body is in strict mode. `arguments.caller` is no longer part of the language.

To let a function call itself, give it a name.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. To turn it on:

```toml bunfig.toml
[lint.rules]
"no-caller" = "error" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad */}
```js
const factorial = function (n) {
  return n <= 1 ? 1 : n * arguments.callee(n - 1);
};
```

Not reported:

{/* good */}
```js
const factorial = function fact(n) {
  return n <= 1 ? 1 : n * fact(n - 1);
};
```
