Open mort3za opened 5 years ago
@mort3za Sorry but dotnet-format does not currently work with razor files. We would like to support razor scenarios in the future.
Is this still a thing? Are there any alternative linters/formatters for razor or cshtml syntax?
/cc @ajaybhargavb for curiosities sake. It'd be a suppper hard problem to do right if we're taking into account things like TagHelpers/Components 😄
Is there even editorconfig support for razor files (outside of the basic spacing, encoding, and line endings)? Yesterday I was trying to set them up to use K&R style braces while my .cs
files used Allman but the format feature in VS wasn't formatting the razor files with the new expected brace style. It seems like whatever you pick for your c# settings gets used for all c# code instead of letting you have settings based on the file extension.
Still looking for a CLI solution to format .cs, .cshtml and .razor files.
can't dotnet format
just format the content from the @code { }
block from razor files?
Any updates on this?
I just tried
dotnet-format --files Home/Home.cshtml
on my razor template but seems it does not read it at all.(But tried on other filetypes and works great).
Is razor templates supported?