PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide/Linting
sneha122 d9ce6b38bd
fix: show linting errors on browser API added (#32732)
## 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:
<img width="952" alt="Screenshot 2024-04-17 at 3 40 19 PM"
src="https://github.com/appsmithorg/appsmith/assets/30018882/e2dbb1ab-52d4-4b2c-ae1e-93516cf399ea">

After:
<img width="642" alt="Screenshot 2024-04-17 at 3 41 11 PM"
src="https://github.com/appsmithorg/appsmith/assets/30018882/9cb050d8-86ac-47b1-8804-7405a3f9bf1f">

Note: Existing cypress test of `BasicLint_spec.ts` has been modified to
assert linting issues in such case.

Fixes https://github.com/appsmithorg/appsmith/issues/16535

## Automation

/ok-to-test tags="@tag.JS"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8734064205>
> Commit: 86ad8803029c9250a0d283767ea142a2c78235d0
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8734064205&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->








<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
- Updated test case descriptions and added steps for better browser
interaction and lint error assertions in the linting functionality.

- **Refactor**
	- Modified linting options to improve behavior in browser environments.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-04-18 18:49:15 +05:30
..
AsyncFunctionsBoundInSyncFields_Spec.ts feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
BasicLint_spec.ts fix: show linting errors on browser API added (#32732) 2024-04-18 18:49:15 +05:30
EntityPropertiesLint_spec.ts feat: enabled editor pane sidebar (#29882) 2024-01-12 20:13:58 +05:30
ErrorReporting_spec.ts feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30