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

cannot lint a brand new js lib #26755

Open
1 of 4 tasks
GaryB432 opened this issue Jun 28, 2024 · 5 comments
Open
1 of 4 tasks

cannot lint a brand new js lib #26755

GaryB432 opened this issue Jun 28, 2024 · 5 comments
Assignees
Labels
blocked: retry with latest Retry with latest release or head. scope: linter Issues related to Eslint support in Nx stale type: bug

Comments

@GaryB432
Copy link

GaryB432 commented Jun 28, 2024

Current Behavior

My brand new workspace does not lint my brand new lib. nx lint my-lib says Cannot find configuration for task my-lib:lint

Expected Behavior

My lib would lint out of the box

GitHub Repo

No response

Steps to Reproduce

npx create-nx-workspace@latest ws --preset=apps --workspaceType=integrated --useGitHub --packageManager=npm --defaultBase=master --nx-cloud=skip
cd ws
npx nx g @nx/js:lib --name=my-lib --directory=libs/my-lib --no-publishable --projectNameAndRootFormat=as-provided --strict --testEnvironment=node --unitTestRunner=vitest --bundler=vite --linter=eslint
npx nx lint my-lib
# observe Cannot find configuration for task my-lib:lint
npx nx run-many -t lint
# observe Successfully ran target lint for 0 projects (16ms)

Nx Report

Node   : 20.10.0
OS     : win32-x64
npm    : 10.2.3

nx                 : 19.3.2
@nx/js             : 19.3.2
@nx/linter         : 19.3.2
@nx/eslint         : 19.3.2
@nx/workspace      : 19.3.2
@nx/devkit         : 19.3.2
@nx/eslint-plugin  : 19.3.2
@nrwl/tao          : 19.3.2
@nx/vite           : 19.3.2
@nx/web            : 19.3.2
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin

Failure Logs

Cannot find configuration for task my-lib:lint

Package Manager Version

No response

Operating System

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

Additional Information

No response

@rendmath
Copy link

rendmath commented Jul 7, 2024

Same issue here with a new React app. The issue could be in the eslint plugin function getProjectUsingESLintConfig that returns a null project.

This essentially seems to render the ESLint integration useless for integrated monorepos.

@AgentEnder
Copy link
Member

I believe this should have been corrected in the v14 release. Can you try again with latest? If its still failing, uploading a reproduction should help diagnose further.

@AgentEnder AgentEnder added blocked: retry with latest Retry with latest release or head. scope: linter Issues related to Eslint support in Nx labels Jul 8, 2024
@GaryB432
Copy link
Author

GaryB432 commented Jul 8, 2024

this still occurs on 19.4.1 as noted above. I hoped providing the 4 lines to paste into the terminal was good for providing a repro :)

Copy link

This issue has been automatically marked as stale because no results of retrying on the latest version of Nx was provided within 7 days.
It will be closed in 21 days if no results are provided.
If the issue is still present, please reply to keep it active.
If the issue was not present, please close this issue.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Jul 16, 2024
@GaryB432
Copy link
Author

yes. Hi. on 19.4.3 the same steps to reproduce do still reproduce the errors mentioned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: retry with latest Retry with latest release or head. scope: linter Issues related to Eslint support in Nx stale type: bug
Projects
None yet
Development

No branches or pull requests

4 participants