Home:ALL Converter>How to run Nx serve for app with lint errors?

How to run Nx serve for app with lint errors?

Ask Time:2021-12-10T19:48:01         Author:mutant_america

Json Formatter

I got an nx Angular project and I got some lint rules inside

When I run nx run shell:lint - I got all the errors and warnings that should be according to .eslintrc.json config file,

but nx run shell:serve - builds and serves without any errors.

This is config for shell serve operation

  "serve": {
      "executor": "@nrwl/angular:webpack-server",
      "configurations": {
        "production": {
          "browserTarget": "shell:build:production"
        },
        "development": {
          "browserTarget": "shell:build:development"
        }
      },
      "defaultConfiguration": "development",
      "options": {}
  }

But I want to get errors from linter on serve/build, Is it any way how to do that?

I can definitely catch all of them on pre-commit hook, but still want to catch it in runtime compilation.

Author:mutant_america,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/70304053/how-to-run-nx-serve-for-app-with-lint-errors
yy