ng lint

From Get docs
< CLI Overview and Command ReferenceAngular/docs/10/cli/lint

Runs linting tools on Angular app code in a given project folder.

ng lint <project> [options]

ng l <project> [options]


Takes the name of the project, as specified in the projects section of the angular.json workspace configuration file. When a project name is not supplied, it will execute for all projects.

The default linting tool is TSLint, and the default configuration is specified in the project's tslint.json file.


Argument Description
<project> The name of the project to lint.


Option Description

The linting configuration to use.

Aliases: -c

--exclude Files to exclude from linting.
--files Files to include in linting.

Fixes linting errors (may overwrite linted files).

Default: false


Succeeds even if there was linting errors.

Default: false


Output format (prose, json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist).

Default: stylish


Shows a help message for this command in the console.

Default: false


Show output text.

Default: false

--tsConfig=tsConfig The name of the TypeScript configuration file.
--tslintConfig=tslintConfig The name of the TSLint configuration file.

Controls the type check for linting.

Default: false

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.