Boshen
99a40ce6ac
fix(semantic): export default foo should have ExportLocalName::Default(NameSpan) entry ( #3823 )
2024-06-22 11:09:23 +00:00
Boshen
051ceb6539
chore: improve some format by running cargo +nightly fmt
2024-06-19 00:48:30 +08:00
Boshen
ae6561308c
refactor(syntax): use FxHashMap for ModuleRecord::request_modules ( #3124 )
...
closes #3121
The ordering is not important here.
2024-04-29 03:37:34 +00:00
Don Isaac
1ea24ea0a7
fix(semantic): symbols inside functions and classes incorrectly flagged as exported ( #2896 )
...
# What This PR Does
Symbols declared inside exported functions and classes were being
incorrectly flagged with `SymbolFlags::Export`.
For example,
```ts
export function foo<T>(a: T) {
let b = String(a)
return b
}
```
`T`, `a`, and `b` were all flagged as exported.
## Further Work
It doesn't seem like exported enums and interfaces are being included in
`ModuleRecord`. Am I looking in the wrong place, or are they actually
missing?
2024-04-05 23:01:27 +08:00
Dunqing
df628289ff
fix(linter/import): ignore export declaration in no-duplicates ( #2863 )
2024-03-30 12:57:43 +08:00
Dunqing
1b5e544a36
refactor(semantic): distinguish whether requested_modules is type imports/exports ( #2848 )
2024-03-29 19:52:30 +08:00
Dunqing
712b3d2a11
feat(semantic): distinguish type imports in ModuleRecord ( #2785 )
...
I am not sure moving `ImportOrExportKind` to `oxc-syntax` is a good
solution.
2024-03-23 21:38:17 +08:00
Boshen
366a87975d
feat(linter): resolve ESM star exports ( #2682 )
2024-03-11 21:43:11 +08:00
overlookmotel
0646bf34fa
refactor: rename CompactString to CompactStr ( #2619 )
...
Preparatory step for #2620 .
This PR purely changes names of types and methods:
* `CompactString` -> `CompactStr`
* `Atom::to_compact_string` -> `to_compact_str`
* `Atom::into_compact_string` -> `into_compact_str`
Have split this into a separate PR as the diff is large, but it does absolutely nothing but renaming (I've checked the whole diff twice, so feel free not to check it again!). This should make it easier to see the content of the substantive change in #2620 .
2024-03-06 12:24:23 +08:00
Boshen
d41dcc316e
feat(linter): remove all commonjs logic for import plugin ( #2537 )
2024-02-28 18:13:44 +08:00
Boshen
be6b8b7ce6
[BREAKING CHANGE] Change Atom to Atom<'a> to make it safe ( #2497 )
...
Part of #2295
This PR splits the `Atom` type into `Atom<'a>` and `CompactString`.
All the AST node strings now use `Atom<'a>` instead of `Atom` to signify
it belongs to the arena.
It is now up to the user to select which form of the string to use.
This PR essentially removes the really unsafe code
93742f89e9/crates/oxc_span/src/atom.rs (L98-L107)
which can lead to

2024-02-26 19:34:40 +08:00
Boshen
fba66dcc75
fix(linter): improve import/no-named-as-default ( #2494 )
2024-02-25 21:24:08 +08:00
Boshen
f64c7e04a3
feat(linter): handle cjs module.exports.foo = bar and exports.foo = bar ( #2492 )
2024-02-24 23:54:43 +08:00
Boshen
3e1794d6c0
feat(syntax): implement Debug for ModuleRecord ( #2488 )
2024-02-24 17:34:42 +08:00
Wenzhe Wang
90524c83f7
feat(linter): add eslint-plugin-import(export) rule ( #1654 )
2023-12-13 23:12:45 +08:00
Wenzhe Wang
7a9f821b1d
chore: fix typo ( #889 )
2023-09-10 21:44:09 +08:00
Boshen
9ff12a9696
feat(linter): eslint-plugin-import/no-self-import ( #878 )
...
closes #440 #441
2023-09-10 00:12:26 +08:00
Boshen
75d928a20d
feat(syntax): add loaded_modules to ModuleRecord
2023-09-07 22:56:09 +08:00
Boshen
fdf288c685
refactor: improve code coverage in various places ( #721 )
2023-08-11 15:17:49 +08:00
Boshen
17a73b1eef
refactor(ast): move ModuleRecord to oxc_syntax
2023-07-03 22:54:27 +08:00