-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: show linting errors on browser API added #32732
Conversation
WalkthroughThis update involves refining the lint error detection and presentation in a JavaScript context and adjusting linting behavior in browser environments by modifying test cases and constants. Changes
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8720157792. |
Deploy-Preview-URL: https://ce-32732.dp.appsmith.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This Pr may be delayed due to critical issue here |
Description
Whenever browser apis like window, navigator, print etc are using in the JSmode bindings, current implementation does not show linting errors and if such JS code is executed, we get error toast message of
window.alert is not defined
. This is because linting errors are identified inside lint worker and since we are inside the context of worker, it does not understand the browser context or its APIs, thus this PR highlights the linting errors when any of the browser APIs are using in JS bindings.Before:
After:
Note: Existing cypress test of
BasicLint_spec.ts
has been modified to assert linting issues in such case.Fixes #16535
Automation
/ok-to-test tags="@tag.JS"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8734064205
Commit: 86ad880
Cypress dashboard url: Click here!
Summary by CodeRabbit
Tests
Refactor