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

v19.8.3 - Expected an assignment or function call and instead saw an expression #28245

Open
1 of 4 tasks
gperdomor opened this issue Oct 2, 2024 · 2 comments · May be fixed by #29457
Open
1 of 4 tasks

v19.8.3 - Expected an assignment or function call and instead saw an expression #28245

gperdomor opened this issue Oct 2, 2024 · 2 comments · May be fixed by #29457
Assignees
Labels
scope: linter Issues related to Eslint support in Nx type: bug

Comments

@gperdomor
Copy link
Contributor

gperdomor commented Oct 2, 2024

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

  1. Create a new empty workspace
  2. Install @nx/plugin
  3. Create a new plugin with e2e
  4. 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

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

Additional Information

Related to #28069

@gperdomor
Copy link
Contributor Author

@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 jaysoo added the scope: linter Issues related to Eslint support in Nx label Oct 14, 2024
@jaysoo jaysoo self-assigned this Oct 14, 2024
@santoshyadavdev
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: linter Issues related to Eslint support in Nx type: bug
Projects
None yet
3 participants