-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
chore(create-vite): react-ts non-null-assertion #7881
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Thanks for the PR @purp1eeeee! Interesting problem. |
Hmmm... |
Beside that, using the As this is controlled by the user and they just can remove
|
I'm also not sure about this PR, I prefer the previous code as it's more in line with the other templates and looks straightforward. I probably wouldn't want the extra code in production either as it's almost always guaranteed that the element exists. |
Sorry. I have added to the Description why I submitted this PR |
another way is to use eslint-disable comment. good to have a /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Here's a description about why this configuration is necessary. */ |
I would be also okay with that as we are using this "strategy" already e.g. here:
|
FYI CRA uses |
Hmmm... I guess one way around this is to use eslint comments. However, I am not sure why you are trying to work around it with comments. |
@purp1eeeee I think we can use |
@patak-dev @Shinigami92 |
Description
hi!
I fixed the non-null assertion operator part of the react-ts template
why?
https://palantir.github.io/tslint/rules/no-non-null-assertion/
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).