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

Stricter types #1914

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Stricter types #1914

merged 3 commits into from
Nov 21, 2024

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Nov 20, 2024

Mirrors nextstrain/nextstrain.org#1077

Checklist

From rule doc page¹:

    It's generally better to structure program logic so that TypeScript
    understands when values may be nullable.

Also added a comment to eventually move to use
plugin:@typescript-eslint/strict which includes this rule.

¹ <https://typescript-eslint.io/rules/no-non-null-assertion/>
This should not be used unless there is no other way for the TypeScript
compiler to infer the type properly. In such cases, a comment with
per-line exception should be used.

I will address existing violations in subsequent commits.
The types can already be inferred with existing usage.
@victorlin victorlin self-assigned this Nov 20, 2024
@nextstrain-bot nextstrain-bot temporarily deployed to auspice-victorlin-stric-xn8yld November 20, 2024 22:54 Inactive
@victorlin
Copy link
Member Author

Merging pre-review since nextstrain/nextstrain.org#1077 was already approved.

@victorlin victorlin merged commit 9e1ea80 into master Nov 21, 2024
25 checks passed
@victorlin victorlin deleted the victorlin/stricter-types branch November 21, 2024 01:32
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.

2 participants