Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_analyze): lint/correctness/noUndeclaredVariables incorrectly identifies AggregateError as an undeclared variable. #4365 #4366

Merged
merged 2 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Code actions are formatted using Rome's formatter. If the formatter is disabled,
the code action is not formatted.

- Fix an issue when `noUndeclaredVariables` incorrectly identifies `AggregateError` as an undeclared variable. [#4365](https://github.com/rome/tools/issues/4365)
#### New rules
- [`noConfusingArrow`](https://docs.rome.tools/lint/rules/noConfusingArrow/)
- [`noRedundantRoles`](https://docs.rome.tools/lint/rules/noRedundantRoles/)
Expand Down
6 changes: 4 additions & 2 deletions crates/rome_js_analyze/src/globals/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub const BUILTIN: [&str; 65] = [
pub const BUILTIN: [&str; 66] = [
"AggregateError",
"Array",
"ArrayBuffer",
"Atomics",
Expand Down Expand Up @@ -295,7 +296,8 @@ pub const ES_2020: [&str; 63] = [
"valueOf",
];

pub const ES_2021: [&str; 65] = [
pub const ES_2021: [&str; 66] = [
"AggregateError",
"Array",
"ArrayBuffer",
"Atomics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ assignment = "value";
// valid
document;
navigator;
new ArrayBuffer();
new ArrayBuffer();
new AggregateError();
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ assignment = "value";
document;
navigator;
new ArrayBuffer();
new AggregateError();

```

# Diagnostics
Expand Down