> 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-obj-calls

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

| Preset                   | Configured Value |
| ------------------------ | ---------------- |
| ✅ js.configs.recommended | `"error"`        |


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

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

## Rule Details

Disallows calling global objects (`Math`, `JSON`, `Reflect`, `Atomics`, `Intl`) as functions or constructors. These are namespace objects that provide properties and methods but are not themselves callable. Attempting to call them will throw a `TypeError` at runtime.

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

```javascript
var x = Math();
var y = JSON();
var z = Reflect();
var a = new Math();
var b = new JSON();
```

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

```javascript
var x = Math.random();
var y = JSON.parse('{}');
var z = Reflect.get(obj, 'key');
var a = new Intl.Segmenter();
var b = Math.PI;
```

## Original Documentation

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