Skip to content

Instantly share code, notes, and snippets.

@craigiswayne
Last active August 5, 2019 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigiswayne/62ec315e91a885417d87a4801d8c705e to your computer and use it in GitHub Desktop.
Save craigiswayne/62ec315e91a885417d87a4801d8c705e to your computer and use it in GitHub Desktop.
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 -->
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment