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

test(eslint): enable no-unnecessary-type-assertion #4842

Merged
merged 2 commits into from
Aug 20, 2021

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Aug 20, 2021

There's a lot of assertions in our code base that were once necessary, but that's no longer the case.

This rule requires typescript, so files that are ignored in typescript also need to be ignored for these rules

There's a lot of assertions in our code base that were once necessary, but that's no longer the case.

This rule requires typescript, so files that are ignored in typescript also need to be ignored for these rules
@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 20, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3c712f2:

Sandbox Source
InstantSearch.js Configuration


return () => {
bodyRef!.current!.removeChild(props.bodyElement);
node.removeChild(props.bodyElement);
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 eslint rule actually highlighted this, as before bodyRef!.current! was not detected by the hooks rule, but once bodyRef! was changed to bodyRef, it highlighted that the ref probably was the wrong one in the cleanup function

@Haroenv Haroenv requested review from a team, eunjae-lee and tkrugg and removed request for a team August 20, 2021 13:35
@Haroenv Haroenv merged commit 047acd0 into master Aug 20, 2021
@Haroenv Haroenv deleted the ci/eslint-useless-assertion branch August 20, 2021 15:40
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.

None yet

2 participants