---
source: crates/oxc_linter/src/tester.rs
---
  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:16]
 1 │ ({ set a(val){ return val + 1; } })
   ·                ───────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:17]
 1 │ ({ set a(val) { return 1; } })
   ·                 ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:24]
 1 │ class A { set a(val) { return 1; } }
   ·                        ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:31]
 1 │ class A { static set a(val) { return 1; } }
   ·                               ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:23]
 1 │ (class { set a(val) { return 1; } })
   ·                       ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:17]
 1 │ ({ set a(val) { return val; } })
   ·                 ───────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:24]
 1 │ class A { set a(val) { return undefined; } }
   ·                        ─────────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:23]
 1 │ (class { set a(val) { return null; } })
   ·                       ────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:17]
 1 │ ({ set a(val) { return x + y; } })
   ·                 ─────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:24]
 1 │ class A { set a(val) { return foo(); } }
   ·                        ─────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:23]
 1 │ (class { set a(val) { return this._a; } })
   ·                       ───────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:17]
 1 │ ({ set a(val) { return this.a; } })
   ·                 ──────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:28]
 1 │ ({ set a(val) { if (foo) { return 1; }; } })
   ·                            ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:30]
 1 │ class A { set a(val) { try { return 1; } catch(e) {} } }
   ·                              ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:57]
 1 │ (class { set a(val) { while (foo){ if (bar) break; else return 1; } } })
   ·                                                         ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:17]
 1 │ ({ set a(val) { return 1; }, set b(val) { return 1; } })
   ·                 ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:43]
 1 │ ({ set a(val) { return 1; }, set b(val) { return 1; } })
   ·                                           ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:24]
 1 │ class A { set a(val) { return 1; } set b(val) { return 1; } }
   ·                        ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:49]
 1 │ class A { set a(val) { return 1; } set b(val) { return 1; } }
   ·                                                 ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:23]
 1 │ (class { set a(val) { return 1; } static set b(val) { return 1; } })
   ·                       ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:55]
 1 │ (class { set a(val) { return 1; } static set b(val) { return 1; } })
   ·                                                       ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:27]
 1 │ ({ set a(val) { if(val) { return 1; } else { return 2 }; } })
   ·                           ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:46]
 1 │ ({ set a(val) { if(val) { return 1; } else { return 2 }; } })
   ·                                              ────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:46]
 1 │ class A { set a(val) { switch(val) { case 1: return x; case 2: return y; default: return z } } }
   ·                                              ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:64]
 1 │ class A { set a(val) { switch(val) { case 1: return x; case 2: return y; default: return z } } }
   ·                                                                ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:83]
 1 │ class A { set a(val) { switch(val) { case 1: return x; case 2: return y; default: return z } } }
   ·                                                                                   ────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:62]
 1 │ (class { static set a(val) { if (val > 0) { this._val = val; return val; } return false; } })
   ·                                                              ───────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:76]
 1 │ (class { static set a(val) { if (val > 0) { this._val = val; return val; } return false; } })
   ·                                                                            ─────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:27]
 1 │ ({ set a(val) { if(val) { return 1; } else { return; }; } })
   ·                           ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:46]
 1 │ class A { set a(val) { switch(val) { case 1: return x; case 2: return; default: return z } } }
   ·                                              ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:81]
 1 │ class A { set a(val) { switch(val) { case 1: return x; case 2: return; default: return z } } }
   ·                                                                                 ────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:72]
 1 │ (class { static set a(val) { if (val > 0) { this._val = val; return; } return false; } })
   ·                                                                        ─────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:32]
 1 │ ({ set a(val) { function b(){} return b(); } })
   ·                                ───────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:24]
 1 │ class A { set a(val) { return () => {}; } }
   ·                        ────────────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:49]
 1 │ (class { set a(val) { function b(){ return 1; } return 2; } })
   ·                                                 ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:41]
 1 │ ({ set a(val) { function b(){ return; } return 1; } })
   ·                                         ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:58]
 1 │ class A { set a(val) { var x = function() { return 1; }; return 2; } }
   ·                                                          ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:50]
 1 │ (class { set a(val) { var x = () => { return; }; return 2; } })
   ·                                                  ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:33]
 1 │ function f(){}; ({ set a(val) { return 1; } });
   ·                                 ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:44]
 1 │ x = function f(){}; class A { set a(val) { return 1; } };
   ·                                            ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:40]
 1 │ x = () => {}; A = class { set a(val) { return 1; } };
   ·                                        ─────────
   ╰────

  ⚠ eslint(no-setter-return): Setter cannot return a value
   ╭─[no_setter_return.tsx:1:25]
 1 │ return; ({ set a(val) { return 1; } }); return 2;
   ·                         ─────────
   ╰────
