---
source: crates/oxc_linter/src/tester.rs
---
  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:1:16]
 1 │ function foo() {}
   ·                ──
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:1:19]
 1 │ const bar = () => {};
   ·                   ──
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:1:17]
 1 │ function* baz() {}
   ·                 ──
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:3:29]
 2 │             const obj = {
 3 │ ╭─▶             foo: function() {
 4 │ ╰─▶             },
 5 │                 bar: function*() {
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:5:30]
 4 │                 },
 5 │ ╭─▶             bar: function*() {
 6 │ ╰─▶             },
 7 │                 foobar() {
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:7:22]
 6 │                 },
 7 │ ╭─▶             foobar() {
 8 │ ╰─▶             }
 9 │             };
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:3:27]
 2 │             class A {
 3 │ ╭─▶             constructor() {
 4 │ ╰─▶             }
 5 │                 foo() {
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:5:19]
 4 │                 }
 5 │ ╭─▶             foo() {
 6 │ ╰─▶             }
 7 │                 *foo1() {
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
   ╭─[no_empty_function.tsx:7:21]
 6 │                 }
 7 │ ╭─▶             *foo1() {
 8 │ ╰─▶             }
 9 │                 get fooz() {
   ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
    ╭─[no_empty_function.tsx:9:24]
  8 │                 }
  9 │ ╭─▶             get fooz() {
 10 │ ╰─▶             }
 11 │                 set fooz(value) {
    ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
    ╭─[no_empty_function.tsx:11:29]
 10 │                 }
 11 │ ╭─▶             set fooz(value) {
 12 │ ╰─▶             }
 13 │                 static bar() {
    ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
    ╭─[no_empty_function.tsx:13:26]
 12 │                 }
 13 │ ╭─▶             static bar() {
 14 │ ╰─▶             }
 15 │                 static *barr() {
    ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
    ╭─[no_empty_function.tsx:15:28]
 14 │                 }
 15 │ ╭─▶             static *barr() {
 16 │ ╰─▶             }
 17 │                 static get baz() {
    ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
    ╭─[no_empty_function.tsx:17:30]
 16 │                 }
 17 │ ╭─▶             static get baz() {
 18 │ ╰─▶             }
 19 │                 static set baz(value) {
    ╰────
  help: Unexpected empty function block

  ⚠ eslint(no-empty-function): Disallow empty functions
    ╭─[no_empty_function.tsx:19:35]
 18 │                 }
 19 │ ╭─▶             static set baz(value) {
 20 │ ╰─▶             }
 21 │             }
    ╰────
  help: Unexpected empty function block
