-
Notifications
You must be signed in to change notification settings - Fork 193
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
Add warning wave support and warn for unnecessary @
in component parameters
#10346
base: main
Are you sure you want to change the base?
Conversation
I find this feature really bad for the Here is a quick try at removing the As you can see, the variable behind it is not recognized by the editor.
Please revise your plans for the warnings. And if you want to go forward, then at least fix the existing problem with the editor. |
@stsrki I think you misunderstood - this PR warns only about unnecessary Related docs: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-8.0#component-parameters |
Can you give a few examples of such use cases that are going to be affected by this change? |
See this test for some examples: Lines 288 to 341 in 96baca0
In short, if there's a component with attribute that's known to be of a non-string type, it's unnecessary to pass values with |
Resolves #9740.
Related (internal): https://github.com/dotnet/Razor-Language-Design/discussions/5
Commit-by-commit review might be useful.
The warning waves feature needs an SDK counterpart change to fully work (prototype here: dotnet/sdk#40720), but it shouldn't need any coordinated merging - without the SDK passing RazorWarningLevel through, the warnings simply stay disabled.