Managing undocumented and convoluted front-end angular applications is a nightmare as many of you know...
However this document will serve to help those tasked with this management.
tsconfig.json changes
{
"compilerOptions": {
"noUnusedLocals": true,
"noUnusedParameters": true
}
}
This above snippet will prevent the use of unused variables, libraries and parameters
To maintain coding standards for everyone, you can integrate npm lint tests in your pipeline directly after dotnet publishes its dll's
in your *.csproj
file
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run lint" /> <!----- ADD THIS LINE AFTER npm install runs -->
</Target>