Skip to main content
Angular CLI - ng lint

Angular CLI - ng lint

Run the lint target when the workspace has a configured lint builder.

Angular CLI - ng lint illustration

How it works

ng lint runs the workspace lint target. The target is not always included in a new project; Angular’s current guidance may prompt to add a lint package such as angular-eslint. Confirm which rules and builder the workspace actually uses.

Good practice

  • Check the local Angular CLI version and run commands from the intended workspace.
  • Review angular.json targets and builders before assuming optional commands are configured.
  • Use the package manager and lockfile selected by the project.
  • Review generated files, configuration changes, and build output before committing or deploying.

Further reading: Tutorialspoint: Angular CLI - ng lint · Current Angular CLI reference · Workspace configuration.