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

chore: enable eslint for geo interactions and predictions packages #13092

Merged
merged 7 commits into from
Mar 19, 2024

Conversation

HuiSF
Copy link
Member

@HuiSF HuiSF commented Mar 6, 2024

Description of changes

Details see each commit of this PR.

Issue #, if available

Description of how you validated changes

  • Unit tests

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested review from a team as code owners March 6, 2024 20:27
@HuiSF HuiSF force-pushed the hui/chore/geo-inter-pre-eslint branch from ec34905 to 5663c57 Compare March 7, 2024 19:01
@HuiSF HuiSF force-pushed the hui/chore/geo-inter-pre-eslint branch from 5663c57 to 5c7e2b5 Compare March 11, 2024 16:10
@HuiSF HuiSF requested a review from ashika112 March 11, 2024 16:20
@HuiSF HuiSF force-pushed the hui/chore/geo-inter-pre-eslint branch 3 times, most recently from 0df288d to 990d3c1 Compare March 18, 2024 17:52
return;
}

// Push all successes to results
response.Successes?.forEach(success => {
const { GeofenceId, CreateTime, UpdateTime } = success;
const { GeofenceId: geofenceId, CreateTime, UpdateTime } = success;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my curiosity, why was this needed for just GeofenceId?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GeofenceId is declared in the upper scope already. shadow vars.

return;
}

const badGeofenceIds = response.Errors.map(
const targetBadGeofenceIds = response.Errors.map(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this was needed too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto shadow vars

@@ -420,7 +430,7 @@ export class AmazonAIConvertPredictionsProvider {
region: string;
languageCode: string;
}): Promise<WebSocket> {
return new Promise(async (res, rej) => {
return new Promise((resolve, _reject) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Drop the reject altogether?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no await in the promise executor function body. So the async is unnecessary.

@HuiSF HuiSF force-pushed the hui/chore/geo-inter-pre-eslint branch 2 times, most recently from d43cc16 to 295ad16 Compare March 19, 2024 16:50
@HuiSF HuiSF force-pushed the hui/chore/geo-inter-pre-eslint branch from 295ad16 to 5809612 Compare March 19, 2024 17:48
@HuiSF HuiSF merged commit 57feb5b into main Mar 19, 2024
30 checks passed
@HuiSF HuiSF deleted the hui/chore/geo-inter-pre-eslint branch March 19, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants