--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.js --- # Input ```jsx a = a; [a] = [a]; [a, b] = [a, b]; [a, ...b] = [a, ...b]; ({a, b} = {a, b}); [[a], [b]] = [[a], [b]]; [{a}, {b}] = [{a}, {b}]; [{a}, [b]] = [{a}, [b]]; ({a: b} = {a: b}); ({'a': b} = {'a': b}); ({a: b} = {'a': b}); ({1: b} = {'1': b}); ({1: b} = {1: b}); ({['a']: b} = {a: b}); ({1: b} = {[1]: b}); ({a: {b}, c: [d]} = {a: {b}, c: [d]}); ({a, b} = {a, ...x, b}); a.b = a.b; a.#b = a.#b; a[b] = a[b]; a.b.c = a.b.c; ({a} = {a}); a['b'].bar = a['b'].bar; a[foobar].b = a[foobar].b; a[10].b = a[10].b; a[4] = a[4]; ``` # Diagnostics ``` invalid.js:1:5 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. > 1 │ a = a; │ ^ 2 │ [a] = [a]; 3 │ [a, b] = [a, b]; i This is where is assigned. > 1 │ a = a; │ ^ 2 │ [a] = [a]; 3 │ [a, b] = [a, b]; ``` ``` invalid.js:2:8 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 1 │ a = a; > 2 │ [a] = [a]; │ ^ 3 │ [a, b] = [a, b]; 4 │ [a, ...b] = [a, ...b]; i This is where is assigned. 1 │ a = a; > 2 │ [a] = [a]; │ ^ 3 │ [a, b] = [a, b]; 4 │ [a, ...b] = [a, ...b]; ``` ``` invalid.js:3:11 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 1 │ a = a; 2 │ [a] = [a]; > 3 │ [a, b] = [a, b]; │ ^ 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); i This is where is assigned. 1 │ a = a; 2 │ [a] = [a]; > 3 │ [a, b] = [a, b]; │ ^ 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); ``` ``` invalid.js:3:14 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 1 │ a = a; 2 │ [a] = [a]; > 3 │ [a, b] = [a, b]; │ ^ 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); i This is where is assigned. 1 │ a = a; 2 │ [a] = [a]; > 3 │ [a, b] = [a, b]; │ ^ 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); ``` ``` invalid.js:4:14 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 2 │ [a] = [a]; 3 │ [a, b] = [a, b]; > 4 │ [a, ...b] = [a, ...b]; │ ^ 5 │ ({a, b} = {a, b}); 6 │ [[a], [b]] = [[a], [b]]; i This is where is assigned. 2 │ [a] = [a]; 3 │ [a, b] = [a, b]; > 4 │ [a, ...b] = [a, ...b]; │ ^ 5 │ ({a, b} = {a, b}); 6 │ [[a], [b]] = [[a], [b]]; ``` ``` invalid.js:5:12 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 3 │ [a, b] = [a, b]; 4 │ [a, ...b] = [a, ...b]; > 5 │ ({a, b} = {a, b}); │ ^ 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; i This is where is assigned. 3 │ [a, b] = [a, b]; 4 │ [a, ...b] = [a, ...b]; > 5 │ ({a, b} = {a, b}); │ ^ 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; ``` ``` invalid.js:5:15 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 3 │ [a, b] = [a, b]; 4 │ [a, ...b] = [a, ...b]; > 5 │ ({a, b} = {a, b}); │ ^ 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; i This is where is assigned. 3 │ [a, b] = [a, b]; 4 │ [a, ...b] = [a, ...b]; > 5 │ ({a, b} = {a, b}); │ ^ 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; ``` ``` invalid.js:6:16 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); > 6 │ [[a], [b]] = [[a], [b]]; │ ^ 7 │ [{a}, {b}] = [{a}, {b}]; 8 │ [{a}, [b]] = [{a}, [b]]; i This is where is assigned. 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); > 6 │ [[a], [b]] = [[a], [b]]; │ ^ 7 │ [{a}, {b}] = [{a}, {b}]; 8 │ [{a}, [b]] = [{a}, [b]]; ``` ``` invalid.js:6:21 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); > 6 │ [[a], [b]] = [[a], [b]]; │ ^ 7 │ [{a}, {b}] = [{a}, {b}]; 8 │ [{a}, [b]] = [{a}, [b]]; i This is where is assigned. 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); > 6 │ [[a], [b]] = [[a], [b]]; │ ^ 7 │ [{a}, {b}] = [{a}, {b}]; 8 │ [{a}, [b]] = [{a}, [b]]; ``` ``` invalid.js:6:21 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); > 6 │ [[a], [b]] = [[a], [b]]; │ ^ 7 │ [{a}, {b}] = [{a}, {b}]; 8 │ [{a}, [b]] = [{a}, [b]]; i This is where is assigned. 4 │ [a, ...b] = [a, ...b]; 5 │ ({a, b} = {a, b}); > 6 │ [[a], [b]] = [[a], [b]]; │ ^ 7 │ [{a}, {b}] = [{a}, {b}]; 8 │ [{a}, [b]] = [{a}, [b]]; ``` ``` invalid.js:7:16 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 5 │ ({a, b} = {a, b}); 6 │ [[a], [b]] = [[a], [b]]; > 7 │ [{a}, {b}] = [{a}, {b}]; │ ^ 8 │ [{a}, [b]] = [{a}, [b]]; 9 │ ({a: b} = {a: b}); i This is where is assigned. 5 │ ({a, b} = {a, b}); 6 │ [[a], [b]] = [[a], [b]]; > 7 │ [{a}, {b}] = [{a}, {b}]; │ ^ 8 │ [{a}, [b]] = [{a}, [b]]; 9 │ ({a: b} = {a: b}); ``` ``` invalid.js:7:21 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 5 │ ({a, b} = {a, b}); 6 │ [[a], [b]] = [[a], [b]]; > 7 │ [{a}, {b}] = [{a}, {b}]; │ ^ 8 │ [{a}, [b]] = [{a}, [b]]; 9 │ ({a: b} = {a: b}); i This is where is assigned. 5 │ ({a, b} = {a, b}); 6 │ [[a], [b]] = [[a], [b]]; > 7 │ [{a}, {b}] = [{a}, {b}]; │ ^ 8 │ [{a}, [b]] = [{a}, [b]]; 9 │ ({a: b} = {a: b}); ``` ``` invalid.js:7:21 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 5 │ ({a, b} = {a, b}); 6 │ [[a], [b]] = [[a], [b]]; > 7 │ [{a}, {b}] = [{a}, {b}]; │ ^ 8 │ [{a}, [b]] = [{a}, [b]]; 9 │ ({a: b} = {a: b}); i This is where is assigned. 5 │ ({a, b} = {a, b}); 6 │ [[a], [b]] = [[a], [b]]; > 7 │ [{a}, {b}] = [{a}, {b}]; │ ^ 8 │ [{a}, [b]] = [{a}, [b]]; 9 │ ({a: b} = {a: b}); ``` ``` invalid.js:8:16 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; > 8 │ [{a}, [b]] = [{a}, [b]]; │ ^ 9 │ ({a: b} = {a: b}); 10 │ ({'a': b} = {'a': b}); i This is where is assigned. 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; > 8 │ [{a}, [b]] = [{a}, [b]]; │ ^ 9 │ ({a: b} = {a: b}); 10 │ ({'a': b} = {'a': b}); ``` ``` invalid.js:8:21 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; > 8 │ [{a}, [b]] = [{a}, [b]]; │ ^ 9 │ ({a: b} = {a: b}); 10 │ ({'a': b} = {'a': b}); i This is where is assigned. 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; > 8 │ [{a}, [b]] = [{a}, [b]]; │ ^ 9 │ ({a: b} = {a: b}); 10 │ ({'a': b} = {'a': b}); ``` ``` invalid.js:8:21 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; > 8 │ [{a}, [b]] = [{a}, [b]]; │ ^ 9 │ ({a: b} = {a: b}); 10 │ ({'a': b} = {'a': b}); i This is where is assigned. 6 │ [[a], [b]] = [[a], [b]]; 7 │ [{a}, {b}] = [{a}, {b}]; > 8 │ [{a}, [b]] = [{a}, [b]]; │ ^ 9 │ ({a: b} = {a: b}); 10 │ ({'a': b} = {'a': b}); ``` ``` invalid.js:9:15 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 7 │ [{a}, {b}] = [{a}, {b}]; 8 │ [{a}, [b]] = [{a}, [b]]; > 9 │ ({a: b} = {a: b}); │ ^ 10 │ ({'a': b} = {'a': b}); 11 │ ({a: b} = {'a': b}); i This is where is assigned. 7 │ [{a}, {b}] = [{a}, {b}]; 8 │ [{a}, [b]] = [{a}, [b]]; > 9 │ ({a: b} = {a: b}); │ ^ 10 │ ({'a': b} = {'a': b}); 11 │ ({a: b} = {'a': b}); ``` ``` invalid.js:10:19 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 8 │ [{a}, [b]] = [{a}, [b]]; 9 │ ({a: b} = {a: b}); > 10 │ ({'a': b} = {'a': b}); │ ^ 11 │ ({a: b} = {'a': b}); 12 │ ({1: b} = {'1': b}); i This is where is assigned. 8 │ [{a}, [b]] = [{a}, [b]]; 9 │ ({a: b} = {a: b}); > 10 │ ({'a': b} = {'a': b}); │ ^ 11 │ ({a: b} = {'a': b}); 12 │ ({1: b} = {'1': b}); ``` ``` invalid.js:11:17 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 9 │ ({a: b} = {a: b}); 10 │ ({'a': b} = {'a': b}); > 11 │ ({a: b} = {'a': b}); │ ^ 12 │ ({1: b} = {'1': b}); 13 │ ({1: b} = {1: b}); i This is where is assigned. 9 │ ({a: b} = {a: b}); 10 │ ({'a': b} = {'a': b}); > 11 │ ({a: b} = {'a': b}); │ ^ 12 │ ({1: b} = {'1': b}); 13 │ ({1: b} = {1: b}); ``` ``` invalid.js:12:17 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 10 │ ({'a': b} = {'a': b}); 11 │ ({a: b} = {'a': b}); > 12 │ ({1: b} = {'1': b}); │ ^ 13 │ ({1: b} = {1: b}); 14 │ ({['a']: b} = {a: b}); i This is where is assigned. 10 │ ({'a': b} = {'a': b}); 11 │ ({a: b} = {'a': b}); > 12 │ ({1: b} = {'1': b}); │ ^ 13 │ ({1: b} = {1: b}); 14 │ ({['a']: b} = {a: b}); ``` ``` invalid.js:13:15 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 11 │ ({a: b} = {'a': b}); 12 │ ({1: b} = {'1': b}); > 13 │ ({1: b} = {1: b}); │ ^ 14 │ ({['a']: b} = {a: b}); 15 │ ({1: b} = {[1]: b}); i This is where is assigned. 11 │ ({a: b} = {'a': b}); 12 │ ({1: b} = {'1': b}); > 13 │ ({1: b} = {1: b}); │ ^ 14 │ ({['a']: b} = {a: b}); 15 │ ({1: b} = {[1]: b}); ``` ``` invalid.js:14:19 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 12 │ ({1: b} = {'1': b}); 13 │ ({1: b} = {1: b}); > 14 │ ({['a']: b} = {a: b}); │ ^ 15 │ ({1: b} = {[1]: b}); 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); i This is where is assigned. 12 │ ({1: b} = {'1': b}); 13 │ ({1: b} = {1: b}); > 14 │ ({['a']: b} = {a: b}); │ ^ 15 │ ({1: b} = {[1]: b}); 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); ``` ``` invalid.js:15:17 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 13 │ ({1: b} = {1: b}); 14 │ ({['a']: b} = {a: b}); > 15 │ ({1: b} = {[1]: b}); │ ^ 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); 17 │ ({a, b} = {a, ...x, b}); i This is where is assigned. 13 │ ({1: b} = {1: b}); 14 │ ({['a']: b} = {a: b}); > 15 │ ({1: b} = {[1]: b}); │ ^ 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); 17 │ ({a, b} = {a, ...x, b}); ``` ``` invalid.js:16:26 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 14 │ ({['a']: b} = {a: b}); 15 │ ({1: b} = {[1]: b}); > 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); │ ^ 17 │ ({a, b} = {a, ...x, b}); 18 │ a.b = a.b; i This is where is assigned. 14 │ ({['a']: b} = {a: b}); 15 │ ({1: b} = {[1]: b}); > 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); │ ^ 17 │ ({a, b} = {a, ...x, b}); 18 │ a.b = a.b; ``` ``` invalid.js:16:34 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! d is assigned to itself. 14 │ ({['a']: b} = {a: b}); 15 │ ({1: b} = {[1]: b}); > 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); │ ^ 17 │ ({a, b} = {a, ...x, b}); 18 │ a.b = a.b; i This is where is assigned. 14 │ ({['a']: b} = {a: b}); 15 │ ({1: b} = {[1]: b}); > 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); │ ^ 17 │ ({a, b} = {a, ...x, b}); 18 │ a.b = a.b; ``` ``` invalid.js:16:34 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! d is assigned to itself. 14 │ ({['a']: b} = {a: b}); 15 │ ({1: b} = {[1]: b}); > 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); │ ^ 17 │ ({a, b} = {a, ...x, b}); 18 │ a.b = a.b; i This is where is assigned. 14 │ ({['a']: b} = {a: b}); 15 │ ({1: b} = {[1]: b}); > 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); │ ^ 17 │ ({a, b} = {a, ...x, b}); 18 │ a.b = a.b; ``` ``` invalid.js:17:12 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 15 │ ({1: b} = {[1]: b}); 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); > 17 │ ({a, b} = {a, ...x, b}); │ ^ 18 │ a.b = a.b; 19 │ a.#b = a.#b; i This is where is assigned. 15 │ ({1: b} = {[1]: b}); 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); > 17 │ ({a, b} = {a, ...x, b}); │ ^ 18 │ a.b = a.b; 19 │ a.#b = a.#b; ``` ``` invalid.js:18:9 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); 17 │ ({a, b} = {a, ...x, b}); > 18 │ a.b = a.b; │ ^ 19 │ a.#b = a.#b; 20 │ a[b] = a[b]; i This is where is assigned. 16 │ ({a: {b}, c: [d]} = {a: {b}, c: [d]}); 17 │ ({a, b} = {a, ...x, b}); > 18 │ a.b = a.b; │ ^ 19 │ a.#b = a.#b; 20 │ a[b] = a[b]; ``` ``` invalid.js:19:10 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 17 │ ({a, b} = {a, ...x, b}); 18 │ a.b = a.b; > 19 │ a.#b = a.#b; │ ^^ 20 │ a[b] = a[b]; 21 │ a.b.c = a.b.c; i This is where is assigned. 17 │ ({a, b} = {a, ...x, b}); 18 │ a.b = a.b; > 19 │ a.#b = a.#b; │ ^^ 20 │ a[b] = a[b]; 21 │ a.b.c = a.b.c; ``` ``` invalid.js:20:10 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 18 │ a.b = a.b; 19 │ a.#b = a.#b; > 20 │ a[b] = a[b]; │ ^ 21 │ a.b.c = a.b.c; 22 │ ({a} = {a}); i This is where is assigned. 18 │ a.b = a.b; 19 │ a.#b = a.#b; > 20 │ a[b] = a[b]; │ ^ 21 │ a.b.c = a.b.c; 22 │ ({a} = {a}); ``` ``` invalid.js:21:13 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! c is assigned to itself. 19 │ a.#b = a.#b; 20 │ a[b] = a[b]; > 21 │ a.b.c = a.b.c; │ ^ 22 │ ({a} = {a}); 23 │ a['b'].bar = a['b'].bar; i This is where is assigned. 19 │ a.#b = a.#b; 20 │ a[b] = a[b]; > 21 │ a.b.c = a.b.c; │ ^ 22 │ ({a} = {a}); 23 │ a['b'].bar = a['b'].bar; ``` ``` invalid.js:22:9 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! a is assigned to itself. 20 │ a[b] = a[b]; 21 │ a.b.c = a.b.c; > 22 │ ({a} = {a}); │ ^ 23 │ a['b'].bar = a['b'].bar; 24 │ a[foobar].b = a[foobar].b; i This is where is assigned. 20 │ a[b] = a[b]; 21 │ a.b.c = a.b.c; > 22 │ ({a} = {a}); │ ^ 23 │ a['b'].bar = a['b'].bar; 24 │ a[foobar].b = a[foobar].b; ``` ``` invalid.js:23:21 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! bar is assigned to itself. 21 │ a.b.c = a.b.c; 22 │ ({a} = {a}); > 23 │ a['b'].bar = a['b'].bar; │ ^^^ 24 │ a[foobar].b = a[foobar].b; 25 │ a[10].b = a[10].b; i This is where is assigned. 21 │ a.b.c = a.b.c; 22 │ ({a} = {a}); > 23 │ a['b'].bar = a['b'].bar; │ ^^^ 24 │ a[foobar].b = a[foobar].b; 25 │ a[10].b = a[10].b; ``` ``` invalid.js:24:25 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 22 │ ({a} = {a}); 23 │ a['b'].bar = a['b'].bar; > 24 │ a[foobar].b = a[foobar].b; │ ^ 25 │ a[10].b = a[10].b; 26 │ a[4] = a[4]; i This is where is assigned. 22 │ ({a} = {a}); 23 │ a['b'].bar = a['b'].bar; > 24 │ a[foobar].b = a[foobar].b; │ ^ 25 │ a[10].b = a[10].b; 26 │ a[4] = a[4]; ``` ``` invalid.js:25:17 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! b is assigned to itself. 23 │ a['b'].bar = a['b'].bar; 24 │ a[foobar].b = a[foobar].b; > 25 │ a[10].b = a[10].b; │ ^ 26 │ a[4] = a[4]; 27 │ i This is where is assigned. 23 │ a['b'].bar = a['b'].bar; 24 │ a[foobar].b = a[foobar].b; > 25 │ a[10].b = a[10].b; │ ^ 26 │ a[4] = a[4]; 27 │ ``` ``` invalid.js:26:10 lint/correctness/noSelfAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 4 is assigned to itself. 24 │ a[foobar].b = a[foobar].b; 25 │ a[10].b = a[10].b; > 26 │ a[4] = a[4]; │ ^ 27 │ i This is where is assigned. 24 │ a[foobar].b = a[foobar].b; 25 │ a[10].b = a[10].b; > 26 │ a[4] = a[4]; │ ^ 27 │ ```