Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[linter] 17.3.0 adds new default rules #21412

Closed
4 tasks
twittwer opened this issue Jan 30, 2024 · 3 comments · Fixed by #21424
Closed
4 tasks

[linter] 17.3.0 adds new default rules #21412

twittwer opened this issue Jan 30, 2024 · 3 comments · Fixed by #21424
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug

Comments

@twittwer
Copy link
Contributor

twittwer commented Jan 30, 2024

Current Behavior

With the update to Nx 17.3.0 the default eslint rule have changed and activated additional rules by default via plugin:@typescript-eslint/stylistic:

  • @typescript-eslint/array-type
  • @typescript-eslint/consistent-type-definitions
  • @typescript-eslint/consistent-indexed-object-style
  • @typescript-eslint/prefer-function-type
  • @typescript-eslint/no-inferrable-types

Expected Behavior

Because the related commit (4700df6) tried to reset rule changes, I assume this was not intentional.

GitHub Repo

No response

Steps to Reproduce

  1. Create Nx Workspace with 17.2.8
  2. Write some code with generic based array types ReadonlyArray<string>
  3. Run Lint => everything is fine
  4. Update to Nx 17.3.0
  5. Run Lint => error Array type using 'ReadonlyArray<T>' is forbidden. Use 'readonly T[]' instead @typescript-eslint/array-type

Nx Report

Node   : 20.10.0
   OS     : win32-x64
   npm    : 10.2.3

   nx                 : 17.3.0
   @nx/js             : 17.3.0
   @nx/jest           : 17.3.0
   @nx/linter         : 17.3.0
   @nx/eslint         : 17.3.0
   @nx/workspace      : 17.3.0
   @nx/angular        : 17.3.0
   @nx/cypress        : 17.3.0
   @nx/devkit         : 17.3.0
   @nx/eslint-plugin  : 17.3.0
   @nx/plugin         : 17.3.0
   @nx/storybook      : 17.3.0
   @nrwl/tao          : 17.3.0
   @nx/web            : 17.3.0
   @nx/webpack        : 17.3.0
   typescript         : 5.3.3
   ---------------------------------------
   Community plugins:
   @compodoc/compodoc   : 1.1.23
   @ngneat/spectator    : 14.0.0
   @ngrx/effects        : 17.1.0
   @ngrx/entity         : 17.1.0
   @ngrx/eslint-plugin  : 17.1.0
   @ngrx/router-store   : 17.1.0
   @ngrx/store          : 17.1.0
   @ngrx/store-devtools : 17.1.0
   @rx-angular/cdk      : 17.0.0
   @rx-angular/state    : 17.0.0
   @rx-angular/template : 17.0.1
   @storybook/angular   : 7.6.10
   @twittwer/compodoc   : 1.12.0
   ng-mocks             : 14.12.1
   ngx-toastr           : 18.0.0

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@twittwer twittwer changed the title [linter] 17.3.0 adds @typescript-eslint/array-type as new default rule [linter] 17.3.0 adds new default rules Jan 30, 2024
@JamesHenry
Copy link
Collaborator

Sorry about the linting noise @twittwer, you are correct that it was not intentional. I have a PR up to disable these rules and we'll get it into 17.3.1: #21424 21424

@JamesHenry JamesHenry added the scope: linter Issues related to Eslint support in Nx label Jan 30, 2024
@JamesHenry JamesHenry self-assigned this Jan 30, 2024
@twittwer
Copy link
Contributor Author

twittwer commented Jan 30, 2024

No problem, and thx for the quick fix 👍

Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants