nx
nx copied to clipboard
v19.8.3 - Expected an assignment or function call and instead saw an expression
Current Behavior
I encountered the following ESLint error when running the nx run-many -t lint command for a newly created workspace with plugin
Expected an assignment or function call and instead saw an expression. eslint@typescript-eslint/no-unused-expressions
Expected Behavior
The linting step should not fail with the @typescript-eslint/no-unused-expressions error
GitHub Repo
No response
Steps to Reproduce
- Create a new empty workspace
- Install @nx/plugin
- Create a new plugin with e2e
- Run lint
Nx Report
❯ nx report
NX Report complete - copy this into the issue template
Node : 22.9.0
OS : darwin-x64
Native Target : x86_64-macos
npm : 10.8.3
nx (global) : 19.8.3
nx : 19.8.3
@nx/js : 19.8.3
@nx/jest : 19.8.3
@nx/linter : 19.8.3
@nx/eslint : 19.8.3
@nx/workspace : 19.8.3
@nx/devkit : 19.8.3
@nx/eslint-plugin : 19.8.3
@nx/plugin : 19.8.3
@nrwl/tao : 19.8.3
typescript : 5.5.4
Failure Logs
❯ nx run-many -t lint
✔ nx run my-plugin:lint [existing outputs match the cache, left as is]
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
✖ nx run my-plugin-e2e:lint
Linting "my-plugin-e2e"...
/Users/gperdomor/Downloads/nx-tools-v7/plugins/my-plugin-e2e/project.json
1:1 error Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions
/Users/gperdomor/Downloads/nx-tools-v7/plugins/my-plugin-e2e/tsconfig.json
1:1 error Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions
/Users/gperdomor/Downloads/nx-tools-v7/plugins/my-plugin-e2e/tsconfig.spec.json
1:1 error Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions
✖ 3 problems (3 errors, 0 warnings)
✖ 3 problems (3 errors, 0 warnings)
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Ran target lint for 2 projects (2s)
✔ 1/2 succeeded [1 read from cache]
✖ 1/2 targets failed, including the following:
- nx run my-plugin-e2e:lint
View structured, searchable error logs at https://nx.app/runs/zUZJzouWU1
Package Manager Version
No response
Operating System
- [X] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
Additional Information
Related to #28069
@jaysoo Hi buddy... I saw that you fix the issue #28069, this it's basically the same but for nx plugins with e2e cases...
@jaysoo I see this issue with react workspace too
eslint .
/Users/s.yadav/react-india/libs/my-awesome-lib/package.json 1:1 error Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions
I am on version Nx 19.8.4
I have put in a Change Request that fixes this issues just waiting on review to be completed
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.