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

Path for Eslint Flat config wrongly resolved #26532

Closed
1 of 4 tasks
e-marfoeldi-carnect opened this issue Jun 12, 2024 · 1 comment · Fixed by #26687
Closed
1 of 4 tasks

Path for Eslint Flat config wrongly resolved #26532

e-marfoeldi-carnect opened this issue Jun 12, 2024 · 1 comment · Fixed by #26687
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug

Comments

@e-marfoeldi-carnect
Copy link

Current Behavior

When i run lint command, I get this:

Linting "library-name"...
 NX   ENOENT: no such file or directory, stat 'C:\my-repos\C:\my-repos\nx-monorepo\libs\library-name\eslint.config.js'

Expected Behavior

Path to eslint flat config should be correctly resolved and therefore run the linting command.

GitHub Repo

No response

Steps to Reproduce

  1. Run nx run library:lint, where library is name of your project
Linting "library"...
 NX   ENOENT: no such file or directory, stat 'C:\my-repos\C:\my-repos\nx-monorepo\libs\library-name\eslint.config.js'

Nx Report

NX   Report complete - copy this into the issue template

Node   : 18.19.1
OS     : win32-x64
npm    : 10.2.4

nx (global)        : 19.0.7
nx                 : 19.2.3
@nx/js             : 19.2.3
@nx/jest           : 19.2.3
@nx/linter         : 19.2.3
@nx/eslint         : 19.2.3
@nx/workspace      : 19.2.3
@nx/angular        : 19.2.3
@nx/cypress        : 19.2.3
@nx/devkit         : 19.2.3
@nx/eslint-plugin  : 19.2.3
@nrwl/tao          : 19.2.3
@nx/web            : 19.2.3
@nx/webpack        : 19.2.3
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/cypress/plugin
@nx/eslint/plugin
---------------------------------------
Community plugins:
@nx-tools/nx-container : 6.0.1

Failure Logs

No response

Package Manager Version

No response

Operating System

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

Additional Information

By debuging linting command, i got to this line, where the path was wrongly resolved on my windows machine:

normalizedOptions.eslintConfig = posix.relative(

This change was introduce in #26350, release https://github.com/nrwl/nx/releases/tag/19.2.0

@FrozenPandaz FrozenPandaz added the scope: linter Issues related to Eslint support in Nx label Jun 13, 2024
FrozenPandaz pushed a commit that referenced this issue Jun 26, 2024
#26687)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26424
Fixes #26586
Fixes #26532

(cherry picked from commit 7ba49ff)
Copy link

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 Jul 27, 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.

3 participants