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

[No Ticket] Cleanup pass and enable strict mode #103

Merged
merged 14 commits into from
Feb 1, 2023
Merged

Conversation

mschuwalow
Copy link
Contributor

Short description if any.

Author Todo List:

  • Add/adjust tests (if applicable)
  • Build in CI passes
  • Latest master revision is merged into the branch
  • Self-Review
  • Set Ready For Review status

@mschuwalow mschuwalow requested a review from a team as a code owner January 25, 2023 22:36
@mschuwalow mschuwalow self-assigned this Jan 25, 2023
const successCallback = (responseAsJson) => {
expect(callCount).to.be.eql(1)
expect(errors).to.be.empty()
expect(responseAsJson).to.be.eql(response)
expect(requestToComplete.url).to.eq('https://idx.liadm.com/idex/unknown/any')
expect(responseAsJson).to.be.eql(response)
expect(callCount).to.be.eql(1)
expect(storageHandler.getCookie('__li_idex_cache')).to.be.eq(JSON.stringify(response))
expect(storageHandler.getCookie('__li_idex_cache_e30')).to.be.eq(JSON.stringify(response))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The cache key for no provided additional parameters changed. (As we are using {} instead of undefined)

I don't think this is a problem as we will just re-resolve, but I can revert this change if desired

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is fine.

src/pixel/state.ts Outdated Show resolved Hide resolved
@3link 3link self-requested a review January 26, 2023 16:13
src/enrichers/identifiers.ts Outdated Show resolved Hide resolved
src/enrichers/people-verified.ts Show resolved Hide resolved
src/initializer.ts Show resolved Hide resolved
const successCallback = (responseAsJson) => {
expect(callCount).to.be.eql(1)
expect(errors).to.be.empty()
expect(responseAsJson).to.be.eql(response)
expect(requestToComplete.url).to.eq('https://idx.liadm.com/idex/unknown/any')
expect(responseAsJson).to.be.eql(response)
expect(callCount).to.be.eql(1)
expect(storageHandler.getCookie('__li_idex_cache')).to.be.eq(JSON.stringify(response))
expect(storageHandler.getCookie('__li_idex_cache_e30')).to.be.eq(JSON.stringify(response))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is fine.

@3link
Copy link
Contributor

3link commented Jan 26, 2023

Have to do a second pass. The PR is too large for one pass.

stackTrace: _truncate(e.stack),
lineNumber: _asInt(e.lineNumber),
lineColumn: _asInt(e.lineColumn),
columnNumber: _asInt(e.columnNumber),
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch

src/events/event-bus.ts Show resolved Hide resolved
interface WrappedExternalCallHandler {
ajaxGet: (
url: string,
onSuccess: (responseText: string, response: unknown) => void,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
onSuccess: (responseText: string, response: unknown) => void,
onSuccess: (responseText: string, response ?: unknown) => void,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no need, the callback will always be provided with the argument

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using only one is fine. The questionmark would signal that the function is only provided 1 argument sometimes, even if it asks for 2.

src/handlers/storage-handler.ts Show resolved Hide resolved
src/types.ts Outdated Show resolved Hide resolved
@mschuwalow mschuwalow requested a review from wi101 January 30, 2023 13:34
@mschuwalow mschuwalow merged commit 454a538 into master Feb 1, 2023
@mschuwalow mschuwalow deleted the cleanup-2 branch February 1, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants