From d2c96b97277d28ba982f66931a04bf9216ba5922 Mon Sep 17 00:00:00 2001 From: Favour Ohanekwu Date: Wed, 23 Feb 2022 08:19:44 -0800 Subject: [PATCH] fix: suppress warnings about the use of expressions where assignments are expected (#11343) --- .../FormWidgets/CheckBoxMultipleLintError_spec.js | 5 ----- app/client/src/workers/lint.ts | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/CheckBoxMultipleLintError_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/CheckBoxMultipleLintError_spec.js index 7a69d38ea7..c8edca2dd1 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/CheckBoxMultipleLintError_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/CheckBoxMultipleLintError_spec.js @@ -42,11 +42,6 @@ describe("Linting warning validation with Checkbox widget", function() { cy.get(commonlocators.lintErrorMsg) .should("be.visible") .contains("Expected an identifier and instead saw ')"); - cy.get(commonlocators.lintErrorMsg) - .should("be.visible") - .contains( - "Expected an assignment or function call and instead saw an expression", - ); cy.get(commonlocators.lintErrorMsg) .should("be.visible") .contains( diff --git a/app/client/src/workers/lint.ts b/app/client/src/workers/lint.ts index c0e83a7b10..1f968d618d 100644 --- a/app/client/src/workers/lint.ts +++ b/app/client/src/workers/lint.ts @@ -75,6 +75,7 @@ export const getLintingErrors = ( evil: false, // Use of eval not allowed funcscope: true, // Tolerate variable definition inside control statements 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, worker: true,