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

@nx/expo project fails when running @nx/eslint #23507

Open
1 of 4 tasks
FranciscoKloganB opened this issue May 17, 2024 · 2 comments
Open
1 of 4 tasks

@nx/expo project fails when running @nx/eslint #23507

FranciscoKloganB opened this issue May 17, 2024 · 2 comments
Assignees
Labels
scope: react-native Issues relating to React Native type: bug

Comments

@FranciscoKloganB
Copy link

Current Behavior

When running

yarn nx run mobile:lint

For some reason, eslint gets invoked within node_module dependencies. Which eventually fails within a package eas-cli depends on.

Oops! Something went wrong! :(

ESLint: 8.57.0

ESLint couldn't find the config "./scripts/eslint-preset.js" to extend from. Please check that the name of the config is correct.

The config "./scripts/eslint-preset.js" was referenced from the config file in "/home/fb/Documents/github/zenif/frontends/apps/mobile/node_modules/@0no-co/graphql.web/package.json".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

Warning: command "eslint ." exited with non-zero status code

Expected Behavior

Eslint should never be invoked on node_module projects

GitHub Repo

No response

Steps to Reproduce

Honestly don't know. I just installed the project on this computer for the first time. It's not happening on my other computer.

Nx Report

Node   : 22.1.0
OS     : linux-x64
yarn   : 4.2.1

nx                 : 19.0.4
@nx/js             : 19.0.4
@nx/jest           : 19.0.4
@nx/linter         : 19.0.4
@nx/eslint         : 19.0.4
@nx/workspace      : 19.0.4
@nx/cypress        : 19.0.4
@nx/detox          : 19.0.4
@nx/devkit         : 19.0.4
@nx/eslint-plugin  : 19.0.4
@nx/expo           : 19.0.4
@nx/playwright     : 19.0.4
@nx/plugin         : 19.0.4
@nx/react          : 19.0.4
@nx/react-native   : 19.0.4
@nx/storybook      : 19.0.4
@nrwl/tao          : 19.0.4
@nx/vite           : 19.0.4
@nx/web            : 19.0.4
@nx/webpack        : 19.0.4
typescript         : 5.3.3
---------------------------------------
Registered Plugins:
@nx/expo/plugin
@nx/vite/plugin
@nx/eslint/plugin
@nx/detox/plugin

Failure Logs

> nx run mobile:lint

> eslint .


Oops! Something went wrong! :(

ESLint: 8.57.0

ESLint couldn't find the config "./scripts/eslint-preset.js" to extend from. Please check that the name of the config is correct.

The config "./scripts/eslint-preset.js" was referenced from the config file in "/home/fb/Documents/github/zenif/frontends/apps/mobile/node_modules/@0no-co/graphql.web/package.json".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

Warning: command "eslint ." exited with non-zero status code

Package Manager Version

yarn

Operating System

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

Additional Information

No response

@FranciscoKloganB
Copy link
Author

The issue is on the generated .eslintrc.json. It does not ignore node_modules.

{
  "extends": ["plugin:@nx/react", "../../.eslintrc.json"],
  "ignorePatterns": ["!**/*", ".expo", "web-build", "cache", "dist"],
  "overrides": [
    {
      "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
      "rules": {}
    },
    {
      "files": ["*.ts", "*.tsx"],
      "rules": {}
    },
    {
      "files": ["*.js", "*.jsx"],
      "rules": {}
    }
  ]
}

@FrozenPandaz FrozenPandaz added the scope: react-native Issues relating to React Native label May 17, 2024
@xiongemi
Copy link
Collaborator

i could not replicate this issue when I create a fresh expo app. do you have a link to a repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: react-native Issues relating to React Native type: bug
Projects
None yet
Development

No branches or pull requests

3 participants