--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsonc --- # Input ```cjs var {} = foo; ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty object pattern. > 1 │ var {} = foo; │ ^^ ``` # Input ```cjs var [] = foo; ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty array pattern. > 1 │ var [] = foo; │ ^^ ``` # Input ```cjs var {a: {}} = foo; ``` # Diagnostics ``` invalid.jsonc:1:9 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty object pattern. > 1 │ var {a: {}} = foo; │ ^^ ``` # Input ```cjs var {a, b: {}} = foo; ``` # Diagnostics ``` invalid.jsonc:1:12 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty object pattern. > 1 │ var {a, b: {}} = foo; │ ^^ ``` # Input ```cjs var {a: []} = foo; ``` # Diagnostics ``` invalid.jsonc:1:9 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty array pattern. > 1 │ var {a: []} = foo; │ ^^ ``` # Input ```cjs function foo({}) {}; ``` # Diagnostics ``` invalid.jsonc:1:14 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty object pattern. > 1 │ function foo({}) {}; │ ^^ ``` # Input ```cjs function foo([]) {}; ``` # Diagnostics ``` invalid.jsonc:1:14 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty array pattern. > 1 │ function foo([]) {}; │ ^^ ``` # Input ```cjs function foo({a: {}}) {}; ``` # Diagnostics ``` invalid.jsonc:1:18 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty object pattern. > 1 │ function foo({a: {}}) {}; │ ^^ ``` # Input ```cjs function foo({a: []}) {}; ``` # Diagnostics ``` invalid.jsonc:1:18 lint/correctness/noEmptyPattern ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty array pattern. > 1 │ function foo({a: []}) {}; │ ^^ ```