{ "id": "cli/lint", "title": "ng lint", "contents": "\n
\n
\n mode_edit\n code\n
\n \n\n\n
\n \n CLI\n
\n\n \n
\n

ng lintlink

\n
\n\n\n \n\n
\n \n

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

\n\n \nng lint <project> [options]\n\nng l <project> [options]\n\n\n\n \n

\n \n Description\n

\n

The command takes an optional project name, as specified in the projects section of the angular.json workspace configuration file.\nWhen a project name is not supplied, executes the lint builder for the default project.

\n

To use the ng lint command, use ng add to add a package that implements linting capabilities. Adding the package automatically updates your workspace configuration, adding a lint CLI builder.\nFor example:

\n\n\"projects\": {\n \"my-project\": {\n ...\n \"architect\": {\n ...\n \"lint\": {\n \"builder\": \"@angular-eslint/builder:lint\",\n \"options\": {}\n }\n }\n }\n}\n\n\n \n\n \n\n

Arguments

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ArgumentDescriptionValue Type
<project>\n

The name of the project to lint.

\n\n \n
string
\n\n\n \n\n

Options

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OptionDescriptionValue TypeDefault Value
\n --configuration\n \n \n

One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section of angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations.

\n\n

Aliases: -c

\n
string
\n --help\n \n \n

Shows a help message for this command in the console.

\n\n \n
true|false|json|JSONfalse
\n\n\n \n
\n
\n\n\n" }