8000 refactor(rome_js_analyze): improve consistency of rules that concern globals by Conaclos · Pull Request #4654 · rome/tools · GitHub
[go: up one dir, main page]

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

refactor(rome_js_analyze): improve consistency of rules that concern globals - #4654

Merged
Conaclos merged 1 commit into
rome:mainfrom
Conaclos:consistent_member_expression_resolution
Jul 4, 2023
Merged

Conaclos merged 1 commit into
rome:mainfrom
Conaclos:consistent_member_expression_resolution

Conversation

@Conaclos
@Conaclos Conaclos commented Jul 4, 2023
Copy link
Copy Markdown
Contributor

Summary

This PR improves the consistency between rules that verifies the use of global identifiers.
All rules now correctly resolves recursive use of globalThis and window.

For example, the following code is now correctly reported by noConsoleLog:

globalThis["globalThis"].window.console.log("log");

Test Plan

New tests added.

@netlify
netlify Bot commented Jul 4, 2023 •
Copy link
Copy Markdown

✅ Deploy Preview for docs-rometools ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 78e34f1
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/64a4875be973ee000896d671
😎 Deploy Preview https://deploy-preview-4654--docs-rometools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Conaclos
Conaclos requested a review from ematipico July 4, 2023 12:52
@github-actions github-actions Bot added A-Linter Area: linter A-Parser Area: parser labels Jul 4, 2023
@ematipico ematipico left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The weird things of the JS world! 😄

Comment thread crates/rome_js_syntax/src/expr_ext.rs Resolved
Comment thread crates/rome_js_syntax/src/expr_ext.rs Resolved
Comment thread crates/rome_js_syntax/src/expr_ext.rs Resolved
Comment thread CHANGELOG.md Resolved
@Conaclos
Conaclos merged commit f65b0d9 into rome:main Jul 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-Linter Area: linter A-Parser Area: parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0