Skip to content
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

Merged
merged 2 commits into from
Apr 18, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,13 @@ describe("Linting", { tags: ["@tag.JS"] }, () => {
AppSidebar.navigate(AppSidebarButton.Editor);
});

it("1. TC 1927 - Shows correct lint error when Api is deleted or created", () => {
it("1. TC 1927 - Show correct lint errors", () => {
// For browser APIs it should give linting error
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
propPane.EnterJSContext("onClick", `{{window}}`);
agHelper.AssertElementExist(locators._lintErrorElement);

// Shows correct lint error when Api is deleted or created
propPane.EnterJSContext(
"onClick",
`{{function(){
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/plugins/Linting/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const lintOptions = (globalData: Record<string, boolean>) =>
sub: true, // Don't force dot notation
expr: true, // suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls
// environments
browser: true,
browser: false,
worker: true,
mocha: false,
// global values
Expand Down
Loading