Skip to content

Lint on build + serve #2551

@diminutivesloop

Description

@diminutivesloop

Currently ng lint can only be run as a stand-alone command. This limits its usefulness as developers have to remember to manually run it before committing or install a linting package for their editor. Lint rules are most effective when violating them results in build failure. This makes failure obvious to developers regardless of their editor setup or workflow. While it is currently possible to accomplish this by chaining ng lint and ng build in npm scripts, this solution is not compatible with watcher tasks such as ng serve.

To fix this I recommend adding a flag to the ng serve and ng build commands that automatically runs ng lint before each build and causes a build failure on any linter rule violation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions