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

Solve Eslint issues with circular definitions #709

Merged
merged 3 commits into from
Mar 18, 2022

Conversation

JKRhb
Copy link
Member

@JKRhb JKRhb commented Mar 18, 2022

This PR should resolve the first point of #534. The typescript-specific rule @typescript-eslint/no-use-before-define is added as an replacement for no-use-before-define which gets rid of some false positives. In the remaining cases, the issues are resolved by reordering definitions so that they are only used after they have been introduced.

@JKRhb JKRhb marked this pull request as draft March 18, 2022 11:10
Copy link
Member

@relu91 relu91 left a comment

Choose a reason for hiding this comment

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

Looks good but you introduced a bunch of errors in the core package too... Since it was hard to get everything correct I would prefer to:

  • leave everything as it is
  • OR fix every error that this new change introduce

@relu91
Copy link
Member

relu91 commented Mar 18, 2022

Oh, it is still in draft sorry :) I guess you are going to solve the additional errors :)

@JKRhb
Copy link
Member Author

JKRhb commented Mar 18, 2022

Oh, it is still in draft sorry :) I guess you are going to solve the additional errors :)

I just converted it to one as I noticed the additional errors 😅 I'll try to resolve the new problems and then we'll hopefully get rid of this issue for good :)

@JKRhb JKRhb marked this pull request as ready for review March 18, 2022 11:35
@JKRhb
Copy link
Member Author

JKRhb commented Mar 18, 2022

The errors should be resolved now :) Had to apply a lot of reordering, though :/

@JKRhb
Copy link
Member Author

JKRhb commented Mar 18, 2022

Hmm, I think the CI pipeline needs to be restarted, not sure why it failed

Copy link
Member

@relu91 relu91 left a comment

Choose a reason for hiding this comment

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

LGTM, let's wait for the CI

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

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

LGTM even though there was a lot of re-ordering which makes it difficult to review 🙃

Do you think we should update prettierrc.json in this PR or a separate one?
As you like!

BTW, I noticed that in .prettierrc.json we still use es5. Shall we change that too?
see https://github.com/eclipse/thingweb.node-wot/search?q=ES5

@relu91
Copy link
Member

relu91 commented Mar 18, 2022

Do you think we should update prettierrc.json in this PR or a separate one?

@JKRhb can you do this here?

@JKRhb
Copy link
Member Author

JKRhb commented Mar 18, 2022

Do you think we should update prettierrc.json in this PR or a separate one?

@JKRhb can you do this here?

Hmm, I think I would open another PR for that, as the change actually results in 65 changed files :/

@JKRhb
Copy link
Member Author

JKRhb commented Mar 18, 2022

I opened #711 for the updates to prettierrc.json :)

@relu91
Copy link
Member

relu91 commented Mar 18, 2022

Ok let's merge this then :)

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