Open arrocke opened 3 months ago
Having the same issue after the new version upgrade:
Node : 20.14.0
OS : win32-x64
npm : 10.7.0
nx (global) : 19.1.1
nx : 19.1.1
@nx/js : 19.1.1
@nx/jest : 19.1.1
@nx/linter : 19.1.1
@nx/eslint : 19.1.1
@nx/workspace : 19.1.1
@nx/angular : 19.1.1
@nx/cypress : 19.1.1
@nx/devkit : 19.1.1
@nx/eslint-plugin : 19.1.1
@nrwl/tao : 19.1.1
@nx/web : 19.1.1
@nx/webpack : 19.1.1
nx-cloud : 19.0.0
typescript : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
---------------------------------------
Community plugins:
@ngrx/component-store : 17.0.1
@ngrx/effects : 17.0.1
@ngrx/entity : 17.0.1
@ngrx/router-store : 17.0.1
@ngrx/schematics : 17.0.1
@ngrx/store : 17.0.1
@ngrx/store-devtools : 17.0.1
@arrocke until this fix, what would be the workaround?
We manually set this rule in our eslint config:
"@typescript-eslint/no-extra-semi": "off"
Current Behavior
Using
plugin:@nx/javascript
orplugin:@nx/typescript
in my eslint configuration along with prettier configured to remove semicolons results an @typescript-eslint/no-extra-semi error on the following codeExpected Behavior
This rule is disabled by default when extending the prettier eslint config because prettier inserts semicolons in places where this rule errors if they are present. In this case, prettier is being overprotective in inserting the semicolon, but we can't change prettier behavior.
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
I think this line in the typescript config (and the corresponding line in the javascript config) should be conditionally set based on
isPrettierAvailable
. IfisPrettierAvailable
is true, the the@typescript-eslint/no-extra-semi
rule should be turned off.I'm happy to open a PR to fix this. For now, we can override this ourselves in our config