swc/crates/swc_ecma_lints/tests/pass
pshu c9c971a792
feat(es/lints): Detect duplicate bindings in export defaults (#8760)
**Description:**
add DefaultDecl's FnExpr and ClassExpr's ident to bindings. 
because all of them should be treated as hoisted Fn/Class Declare

```txt
  × the name `x` is defined multiple times
   ╭─[examples/all.js:1:1]
 1 │ export default class x{}
   ·                      ┬
   ·                      ╰── previous definition of `x` here
 2 │
 3 │ let x = 1;
   ·     ┬
   ·     ╰── `x` redefined here
 4 │ let t = function x(){};
   ╰────
```



**Related issue:**

 - Closes #8755
2024-03-19 14:39:06 +09:00
..
export feat(es/lints): Detect duplicate bindings in export defaults (#8760) 2024-03-19 14:39:06 +09:00
issue-3193/1 fix(es/lints): Fix incorrect duplicate binding error (#3194) 2022-01-05 11:59:10 +09:00
issue-3266/1 fix(es/resolver): Treat a switch statement as a block scope (#3275) 2022-01-15 17:20:17 +09:00
issue-3848/1 fix(es/lints): Ignore identifiers used as types while checking for duplicate bindings (#3869) 2022-03-06 02:29:21 +09:00
issue-3852/1 feat(es/lints): Support module/script mode in duplicate_bindings (#3880) 2022-03-07 05:49:39 +00:00
issue-3929/1 fix(wasm): Fix handling of swc_common::GLOBALS (#3936) 2022-03-10 03:59:46 +00:00
issue-3956/1 fix(es/lints): Don't visit types while collecting const (#3967) 2022-03-11 17:41:28 +09:00
issue-4148/1 fix(es/lints): Ignore type-only imports while checking duplicates (#4163) 2022-03-26 15:25:17 +09:00
issue-4907 fix(es/resolver): Fix handling of block scoped functions (#5092) 2022-07-05 05:04:49 +00:00
issue-5115/1 fix(es/lints): Allow overload in typescript (#5116) 2022-07-06 01:33:58 +09:00
no-dupe-args/valid feat(es/lints): Implement no-dupe-args rule (#3574) 2022-02-16 11:07:42 +00:00
vercel/1 fix(es/lints): Fix incorrect duplicate binding error (#3194) 2022-01-05 11:59:10 +09:00