Skip to content

Instantly share code, notes, and snippets.

@craigiswayne craigiswayne/
Last active Aug 5, 2019

What would you like to do?
Housekeeping Angular Applications

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

DotNet Angular Lint intergration

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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.