> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# no-caller

[Added in v0.4.0](https://github.com/web-infra-dev/rslint/releases/tag/v0.4.0)
## Configuration


```ts title=rslint.config.ts
import { defineConfig, js } from '@rslint/core';

export default defineConfig([
  js.configs.recommended,
  {
    rules: {
      'no-caller': 'error',
    },
  },
]);
```

## Rule Details

Disallows the use of `arguments.caller` and `arguments.callee`. The use of `arguments.caller` and `arguments.callee` make several code optimizations impossible. They have been deprecated in future versions of JavaScript and their use is forbidden in ECMAScript 5 strict mode.

Examples of **incorrect** code for this rule:

```javascript
function foo(n) {
  if (n <= 0) {
    return;
  }
  arguments.callee(n - 1);
}

[1, 2, 3, 4, 5].map(function (n) {
  return !(n > 1) ? 1 : arguments.callee(n - 1) * n;
});
```

Examples of **correct** code for this rule:

```javascript
function foo(n) {
  if (n <= 0) {
    return;
  }
  foo(n - 1);
}

[1, 2, 3, 4, 5].map(function factorial(n) {
  return !(n > 1) ? 1 : factorial(n - 1) * n;
});
```

## Original Documentation

- [ESLint: no-caller](https://eslint.org/docs/latest/rules/no-caller)
- [Source code](https://github.com/eslint/eslint/blob/v10.8.1/lib/rules/no-caller.js)
