diff --git a/.github/workflows/component-test-report.yml b/.github/workflows/component-test-report.yml index 9904004417..d0d75db660 100644 --- a/.github/workflows/component-test-report.yml +++ b/.github/workflows/component-test-report.yml @@ -40,12 +40,10 @@ jobs: run: | npm run test:ts -- component - - name: Uplaod Report to S3 run: | aws s3 cp ./test_reports/ s3://test-integrations-dev/integrations-test-reports/rudder-transformer/${{ github.event.number }}/ --recursive - - name: Comment on PR with S3 Object URL uses: actions/github-script@v7 with: @@ -55,7 +53,7 @@ jobs: // Get the pull request number const prNumber = context.payload.pull_request.number; const commentBody = `Test report for this run is available at: https://test-integrations-dev.s3.amazonaws.com/integrations-test-reports/rudder-transformer/${prNumber}/test-report.html`; - + // Comment on the pull request github.rest.issues.createComment({ @@ -64,5 +62,3 @@ jobs: issue_number: prNumber, body: commentBody }); - - \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..3070655741 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,23 @@ +{ + "prettier.requireConfig": true, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true + }, + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true + }, + "[yaml]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true + }, + "editor.codeActionsOnSave": { + "source.organizeImports": "always" + }, + "eslint.validate": ["javascript", "typescript"] +} diff --git a/src/adapters/networkHandlerFactory.js b/src/adapters/networkHandlerFactory.js index e8c3748d15..de80809a04 100644 --- a/src/adapters/networkHandlerFactory.js +++ b/src/adapters/networkHandlerFactory.js @@ -27,8 +27,9 @@ SUPPORTED_VERSIONS.forEach((version) => { // }, // generic: GenericNetworkHandler, // } - handlers[version][dest] = - require(`../${version}/destinations/${dest}/networkHandler`).networkHandler; + handlers[version][dest] = require( + `../${version}/destinations/${dest}/networkHandler`, + ).networkHandler; } catch { // Do nothing as exception indicates // network handler is not defined for that destination diff --git a/src/controllers/util/index.ts b/src/controllers/util/index.ts index 75d3d8ffa7..c5bf7ab358 100644 --- a/src/controllers/util/index.ts +++ b/src/controllers/util/index.ts @@ -51,7 +51,7 @@ export class ControllerUtility { private static convertSourceInputv0Tov1(sourceEvents: unknown[]): SourceInput[] { return sourceEvents.map( - (sourceEvent) => ({ event: sourceEvent, source: undefined } as SourceInput), + (sourceEvent) => ({ event: sourceEvent, source: undefined }) as SourceInput, ); } diff --git a/src/services/destination/nativeIntegration.ts b/src/services/destination/nativeIntegration.ts index 6b680e3f4a..99234c8ad0 100644 --- a/src/services/destination/nativeIntegration.ts +++ b/src/services/destination/nativeIntegration.ts @@ -214,7 +214,7 @@ export class NativeIntegrationDestinationService implements DestinationService { error: JSON.stringify(v0Response.destinationResponse?.response), statusCode: v0Response.status, metadata, - } as DeliveryJobState), + }) as DeliveryJobState, ); responseProxy = { response: jobStates, diff --git a/src/services/userTransform.ts b/src/services/userTransform.ts index bf34e3d82a..bae833c86a 100644 --- a/src/services/userTransform.ts +++ b/src/services/userTransform.ts @@ -158,7 +158,7 @@ export class UserTransformService { statusCode: status, metadata: e.metadata, error: errorString, - } as ProcessorTransformationResponse), + }) as ProcessorTransformationResponse, ), ); stats.counter('user_transform_errors', eventsToProcess.length, { diff --git a/src/v0/destinations/adobe_analytics/utils.js b/src/v0/destinations/adobe_analytics/utils.js index 97dc6e90bb..ceba177ff1 100644 --- a/src/v0/destinations/adobe_analytics/utils.js +++ b/src/v0/destinations/adobe_analytics/utils.js @@ -93,7 +93,7 @@ function escapeToHTML(inputString) { '&': '&', '<': '<', '>': '>', - }[match]), + })[match], ); } diff --git a/test/test_reporter/reporter.ts b/test/test_reporter/reporter.ts index 135f980398..5741b1cdf0 100644 --- a/test/test_reporter/reporter.ts +++ b/test/test_reporter/reporter.ts @@ -125,9 +125,9 @@ export const generateTestReport = (testData, output, result) => { export const initaliseReport = () => { const htmlTemplate = generateHTMLTemplate(); - if (!fs.existsSync('test_reports')){ + if (!fs.existsSync('test_reports')) { fs.mkdirSync('test_reports'); -} + } fs.writeFileSync('test_reports/test-report.html', htmlTemplate); console.log('Report initialised'); }; diff --git a/tsconfig.json b/tsconfig.json index 9db40dd0e1..926831b612 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ /* Language and Environment */ "target": "ES2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, "lib": [ - "es2019" + "es2019", ] /* Specify a set of bundled library declaration files that describe the target runtime environment. */, // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -100,8 +100,8 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */, }, "exclude": ["./src/**/*.test.js", "./src/**/*.test.ts", "./test"], - "include": ["./src", "./src/**/*.json"] + "include": ["./src", "./src/**/*.json"], }