From 489947bcae07b7b198bc40276b72b3530702c07c Mon Sep 17 00:00:00 2001 From: Yury Shkoda Date: Mon, 20 Jun 2022 19:26:29 +0300 Subject: [PATCH] chore(lint): fixed linting issues --- cypress/integration/sasjs.tests.ts | 10 ++-- sasjs-tests/src/Login.tsx | 8 +-- sasjs-tests/src/serviceWorker.js | 12 ++--- sasjs-tests/src/testSuites/Compute.ts | 2 +- sasjs-tests/src/testSuites/RequestData.ts | 14 +++--- sasjs-tests/src/testSuites/SasjsRequests.ts | 4 +- src/ContextManager.ts | 28 +++++------ src/SAS9ApiClient.ts | 6 +-- src/SASViyaApiClient.spec.ts | 2 +- src/SASViyaApiClient.ts | 51 ++++++++++---------- src/SASjs.ts | 6 ++- src/SASjsApiClient.ts | 2 +- src/SessionManager.ts | 38 ++++++++------- src/api/viya/executeScript.ts | 29 +++++------ src/api/viya/pollJobState.ts | 6 +-- src/api/viya/saveLog.ts | 2 +- src/api/viya/spec/executeScript.spec.ts | 28 +++++------ src/api/viya/spec/getFileStream.spec.ts | 2 +- src/api/viya/spec/pollJobState.spec.ts | 18 +++---- src/api/viya/spec/saveLog.spec.ts | 8 +-- src/api/viya/spec/uploadTables.spec.ts | 8 +-- src/api/viya/spec/writeStream.spec.ts | 2 +- src/api/viya/uploadTables.ts | 2 +- src/api/viya/writeStream.ts | 2 +- src/auth/AuthManager.ts | 6 ++- src/auth/getAccessTokenForSasjs.ts | 4 +- src/auth/getAccessTokenForViya.ts | 4 +- src/auth/refreshTokensForSasjs.ts | 4 +- src/auth/refreshTokensForViya.ts | 4 +- src/auth/spec/AuthManager.spec.ts | 2 +- src/auth/spec/getAccessTokenForSasjs.spec.ts | 2 +- src/auth/spec/getAccessTokenForViya.spec.ts | 2 +- src/auth/spec/getTokens.spec.ts | 2 +- src/auth/spec/openWebPage.spec.ts | 2 +- src/auth/spec/refreshTokensForSasjs.spec.ts | 2 +- src/auth/spec/refreshTokensForViya.spec.ts | 2 +- src/auth/spec/verifySas9Login.spec.ts | 6 +-- src/auth/spec/verifySasViyaLogin.spec.ts | 6 +-- src/auth/verifySas9Login.ts | 4 +- src/auth/verifySasViyaLogin.ts | 4 +- src/file/generateTableUploadForm.ts | 2 +- src/file/spec/generateFileUploadForm.spec.ts | 1 - src/job-execution/ComputeJobExecutor.ts | 2 +- src/job-execution/FileUploader.ts | 5 +- src/job-execution/Sas9JobExecutor.ts | 2 +- src/job-execution/WebJobExecutor.ts | 12 +++-- src/request/RequestClient.ts | 51 ++++++++++---------- src/request/Sas9RequestClient.ts | 14 +++--- src/test/RequestClient.spec.ts | 4 +- src/test/SAS_server_app.ts | 4 +- src/test/utils/isUrl.spec.ts | 4 +- src/types/errors/JobStatePollError.ts | 5 +- src/types/errors/RootFolderNotFoundError.ts | 2 +- src/utils/convertToCsv.ts | 4 +- src/utils/delay.ts | 2 +- src/utils/fetchLogByChunks.ts | 7 ++- src/utils/loginPrompt/index.ts | 4 +- src/utils/parseSasViyaLog.ts | 2 +- src/utils/parseSourceCode.ts | 6 ++- 59 files changed, 243 insertions(+), 236 deletions(-) diff --git a/cypress/integration/sasjs.tests.ts b/cypress/integration/sasjs.tests.ts index 74fa950..84c29ca 100644 --- a/cypress/integration/sasjs.tests.ts +++ b/cypress/integration/sasjs.tests.ts @@ -3,7 +3,7 @@ const username = Cypress.env('username') const password = Cypress.env('password') const testingFinishTimeout = Cypress.env('testingFinishTimeout') -context('sasjs-tests', function () { +context('sasjs-tests', function() { this.beforeAll(() => { cy.visit(sasjsTestsUrl) }) @@ -12,8 +12,8 @@ context('sasjs-tests', function () { cy.reload() }) - it('Should have all tests successfull', (done) => { - cy.get('body').then(($body) => { + it('Should have all tests successfull', done => { + cy.get('body').then($body => { if ($body.find('input[placeholder="User Name"]').length > 0) { cy.get('input[placeholder="User Name"]').type(username) cy.get('input[placeholder="Password"]').type(password) @@ -42,8 +42,8 @@ context('sasjs-tests', function () { }) }) - it('Should have all tests successfull with debug on', (done) => { - cy.get('body').then(($body) => { + it('Should have all tests successfull with debug on', done => { + cy.get('body').then($body => { if ($body.find('input[placeholder="User Name"]').length > 0) { cy.get('input[placeholder="User Name"]').type(username) cy.get('input[placeholder="Password"]').type(password) diff --git a/sasjs-tests/src/Login.tsx b/sasjs-tests/src/Login.tsx index a72b458..1a662ef 100644 --- a/sasjs-tests/src/Login.tsx +++ b/sasjs-tests/src/Login.tsx @@ -9,9 +9,9 @@ const Login = (): ReactElement<{}> => { const appContext = useContext(AppContext) const handleSubmit = useCallback( - (e) => { + e => { e.preventDefault() - appContext.adapter.logIn(username, password).then((res) => { + appContext.adapter.logIn(username, password).then(res => { appContext.setIsLoggedIn(res.isLoggedIn) }) }, @@ -28,7 +28,7 @@ const Login = (): ReactElement<{}> => { placeholder="User Name" value={username} required - onChange={(e) => setUsername(e.target.value)} + onChange={e => setUsername(e.target.value)} />
@@ -38,7 +38,7 @@ const Login = (): ReactElement<{}> => { type="password" value={password} required - onChange={(e) => setPassword(e.target.value)} + onChange={e => setPassword(e.target.value)} />