nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.58k stars 2.36k forks source link

No more eslint warnings after upgrade to v14 #10540

Closed agentx-cgn closed 2 years ago

agentx-cgn commented 2 years ago

Current Behavior

After upgrading from v13 to v14 "nx affected:lint --all" stopped to report warnings. However, e.g. nx run admin-pages:lint does. Interestingly if I introduce a rule which forces an error (e.g. "no-console": 2, ) all the warnings re-appear.

Expected Behavior

"nx affected:lint --all" reports all eslint warnings according to .eslintrc. This appears to be a regression

Expected Warnings: @typescript-eslint/no-unused-vars @typescript-eslint/no-explicit-any

Steps to Reproduce

If all fails, I'll spend time on this.

  "devDependencies": {
    "@angular-devkit/build-angular": "13.3.6",
    "@angular-eslint/eslint-plugin": "13.2.1",
    "@angular-eslint/eslint-plugin-template": "13.2.1",
    "@angular-eslint/template-parser": "13.2.1",
    "@angular/compiler-cli": "13.3.9",
    "@angular/language-service": "13.3.9",
    "@ngrx/schematics": "13.0.2",
    "@ngrx/store-devtools": "13.0.2",
    "@nrwl/angular": "14.1.7",
    "@nrwl/cli": "14.1.7",
    "@nrwl/cypress": "14.1.7",
    "@nrwl/eslint-plugin-nx": "14.1.7",
    "@nrwl/jest": "14.1.7",
    "@nrwl/linter": "14.1.7",
    "@nrwl/workspace": "14.1.7",
    "@types/jest": "27.4.1",
    "@types/node": "17.0.35",
    "@typescript-eslint/eslint-plugin": "5.27.0",
    "@typescript-eslint/parser": "5.27.0",
    "cypress": "9.7.0",
    "eslint": "8.16.0",
    "eslint-config-prettier": "8.5.0",
    "eslint-plugin-cypress": "2.12.1",
    "eslint-plugin-prettier": "4.0.0",
    "jasmine-marbles": "~0.9.1",
    "jest": "27.5.1",
    "jest-preset-angular": "11.1.1",
    "nx": "14.1.7",
    "start-server-and-test": "1.14.0",
    "style-dictionary": "3.7.0",
    "swagger-angular-generator": "4.2.2",
    "ts-jest": "27.1.4",
    "typescript": "4.6.4",
    "webpack-bundle-analyzer": "4.5.0"
  },
  "dependencies": {
    "@angular-architects/module-federation": "14.2.3",
    "@angular/animations": "13.3.9",
    "@angular/cdk": "13.3.7",
    "@angular/common": "13.3.9",
    "@angular/compiler": "13.3.9",
    "@angular/core": "13.3.9",
    "@angular/forms": "13.3.9",
    "@angular/material": "13.3.7",
    "@angular/platform-browser": "13.3.9",
    "@angular/platform-browser-dynamic": "13.3.9",
    "@angular/router": "13.3.9",
    "@ng-bootstrap/ng-bootstrap": "12.1.2",
    "@ngrx/component-store": "13.0.2",
    "@ngrx/effects": "13.0.2",
    "@ngrx/entity": "13.0.2",
    "@ngrx/router-store": "13.0.2",
    "@ngrx/store": "13.0.2",
    "@ngx-translate/core": "14.0.0",
    "@ngx-translate/http-loader": "7.0.0",
    "angular-oauth2-oidc": "13.0.1",
    "bootstrap": "5.1.3",
    "rxjs": "7.5.5",
    "tslib": "2.4.0",
    "zone.js": "0.11.5"
  }
mcmxcdev commented 2 years ago

I think I have encountered this too. Only occurs with the nx affected command.

agentx-cgn commented 2 years ago

Also occurs with: nx run-many --target=lint --all

agentx-cgn commented 2 years ago

Finally I got it: nx run-many --target=lint --all --output-style=static

AgentEnder commented 2 years ago

To give some explanation here, the reason this is happening is that when running commands that hit multiple projects (e.g. affected / run-many) locally Nx defaults to a dynamic terminal output. In this view, you only see the output from tasks that fail.

I believe that if you ran with --verbose you'd see the warnings, but the static output would also work.

I'm going to close this since its working as intended, if you have further questions feel free to reply here or open a new issue.

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.