---
source: crates/oxc_linter/src/tester.rs
expression: no_obj_calls
---
  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let newObj = new JSON();
   ·              ──────────
   ╰────
  help: JSON is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let obj = JSON();
   ·           ──────
   ╰────
  help: JSON is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let obj = globalThis.JSON()
   ·           ─────────────────
   ╰────
  help: JSON is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ new JSON
   · ────────
   ╰────
  help: JSON is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ const foo = x => new JSON()
   ·                  ──────────
   ╰────
  help: JSON is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let newObj = new Math();
   ·              ──────────
   ╰────
  help: Math is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let obj = Math();
   ·           ──────
   ╰────
  help: Math is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let obj = new Math().foo;
   ·           ──────────
   ╰────
  help: Math is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let obj = new globalThis.Math()
   ·           ─────────────────────
   ╰────
  help: Math is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let newObj = new Atomics();
   ·              ─────────────
   ╰────
  help: Atomics is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let obj = Atomics();
   ·           ─────────
   ╰────
  help: Atomics is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let newObj = new Intl();
   ·              ──────────
   ╰────
  help: Intl is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let obj = Intl();
   ·           ──────
   ╰────
  help: Intl is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let newObj = new Reflect();
   ·              ─────────────
   ╰────
  help: Reflect is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let obj = Reflect();
   ·           ─────────
   ╰────
  help: Reflect is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ function() { JSON.parse(Atomics()) }
   ·                         ─────────
   ╰────
  help: Atomics is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let j = JSON; j();
   ·               ───
   ╰────
  help: j is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let a = JSON; let b = a; let c = b; b();
   ·                                     ───
   ╰────
  help: b is not a function.

  ⚠ eslint(no-obj-calls): Disallow calling some global objects as functions
   ╭─[no_obj_calls.tsx:1:1]
 1 │ let m = globalThis.Math; new m();
   ·                          ───────
   ╰────
  help: m is not a function.


