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

dev: add eslint rule for annotation checks #14531

Merged

Conversation

sdirix
Copy link
Member

@sdirix sdirix commented Nov 26, 2024

What it does

Inversify >=6.1 requires to annotate all constructor parameters of injectable classes. To avoid runtime errors we add a new eslint rule to check for this at lint time.

I implemented this checker when re-verifying the latest Inversify fix in #14435

As the original fix is merged, I opened this PR for the linter.

How to test

Remove an annotation of a constructor parameter of an injectable class. Observe that linting will now fail with an explanation.

Review checklist

Reminder for reviewers

Inversify >=6.1 requires to annotate all constructor parameters of
injectable classes. To avoid runtime errors we add a new eslint rule to
check for this at lint time.
@sdirix sdirix requested a review from msujew November 26, 2024 15:46
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Great, looks good to me 👍

@msujew msujew added the quality issues related to code and application quality label Nov 27, 2024
@sdirix sdirix merged commit 5554acb into eclipse-theia:master Nov 27, 2024
11 checks passed
@sdirix sdirix deleted the add-inversify-eslint-rule branch November 27, 2024 12:49
@sdirix sdirix added this to the 1.56.0 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality issues related to code and application quality
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants