---
source: crates/oxc_linter/src/tester.rs
expression: no_class_assign
---
  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:7]
 1 │ class A { } A = 0;
   ·       ┬     ┬
   ·       │     ╰── A is re-assigned here
   ·       ╰── A is declared as class here
   ╰────

  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:7]
 1 │ class A { } ({A} = 0);
   ·       ┬       ┬
   ·       │       ╰── A is re-assigned here
   ·       ╰── A is declared as class here
   ╰────

  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:7]
 1 │ class A { } ({b: A = 0} = {});
   ·       ┬          ┬
   ·       │          ╰── A is re-assigned here
   ·       ╰── A is declared as class here
   ╰────

  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:1]
 1 │ A = 0; class A { }
   · ┬            ┬
   · │            ╰── A is declared as class here
   · ╰── A is re-assigned here
   ╰────

  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:7]
 1 │ class A { b() { A = 0; } }
   ·       ┬         ┬
   ·       │         ╰── A is re-assigned here
   ·       ╰── A is declared as class here
   ╰────

  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:15]
 1 │ let A = class A { b() { A = 0; } }
   ·               ┬         ┬
   ·               │         ╰── A is re-assigned here
   ·               ╰── A is declared as class here
   ╰────

  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:7]
 1 │ class A { } A = 0; A = 1;
   ·       ┬     ┬
   ·       │     ╰── A is re-assigned here
   ·       ╰── A is declared as class here
   ╰────

  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:7]
 1 │ class A { } A = 0; A = 1;
   ·       ┬            ┬
   ·       │            ╰── A is re-assigned here
   ·       ╰── A is declared as class here
   ╰────

  ⚠ eslint(no-class-assign): Unexpected re-assignment of class A
   ╭─[no_class_assign.tsx:1:18]
 1 │ if (foo) { class A {} A = 1; }
   ·                  ┬    ┬
   ·                  │    ╰── A is re-assigned here
   ·                  ╰── A is declared as class here
   ╰────
