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

Commit

Permalink
fix(rome_js_analyze): lint/correctness/noUndeclaredVariables incorrec…
Browse files Browse the repository at this point in the history
…tly identifies AggregateError as an undeclared variable. #4365 (#4366)

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

* fix(rome_js_analyze): lint/correctness/noUndeclaredVariables incorrectly identifies AggregateError as an undeclared variable. #4365
  • Loading branch information
denbezrukov authored Apr 11, 2023
1 parent 3902f46 commit f1af02b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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

0 comments on commit f1af02b

Please sign in to comment.