analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.52k stars 240 forks source link

fix(nx-plugin): typo that causes Nx graph to crash #1330

Closed ilyassFouih closed 2 weeks ago

ilyassFouih commented 3 weeks ago

PR Checklist

I've been having this error when I create an app with Nx

Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
  An error occurred while processing files for the @nx/eslint/plugin plugin.
    - apps/blog/.eslintrc.json: Failed to load plugin '@nx/nx' declared in '.eslintrc.json#overrides[0]': Cannot find module '@nx/eslint-plugin-nx'
  Require stack:
  - /Users/ngilyass/projects/confs/findRally/apps/blog/__placeholder__.js
  Referenced from: /Users/ngilyass/projects/confs/findRally/apps/blog/.eslintrc.json
      Error: Failed to load plugin '@nx/nx' declared in '.eslintrc.json#overrides[0]': Cannot find module '@nx/eslint-plugin-nx'
      Require stack:
      - /Users/ngilyass/projects/confs/findRally/apps/blog/__placeholder__.js
      Referenced from: /Users/ngilyass/projects/confs/findRally/apps/blog/.eslintrc.json
          at Module._resolveFilename (node:internal/modules/cjs/loader:1152:15)
          at Function.resolve (node:internal/modules/helpers:190:19)
          at Object.resolve (/Users/ngilyass/projects/confs/findRally/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
          at ConfigArrayFactory._loadPlugin (/Users/ngilyass/projects/confs/findRally/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3414:33)
          at ConfigArrayFactory._loadExtendedPluginConfig (/Users/ngilyass/projects/confs/findRally/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3233:29)
          at ConfigArrayFactory._loadExtends (/Users/ngilyass/projects/confs/findRally/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3154:29)
          at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/ngilyass/projects/confs/findRally/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3095:25)
          at _normalizeObjectConfigDataBody.next (<anonymous>)
          at ConfigArrayFactory._normalizeObjectConfigData (/Users/ngilyass/projects/confs/findRally/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
          at _normalizeObjectConfigData.next (<anonymous>)

when changed the correct eslint plugin to extends it works Closes #

What is the new behavior?

Does this PR introduce a breaking change?

Other information

[optional] What gif best describes this PR or how it makes you feel?

https://giphy.com/gifs/shrempin-vibin-shremp-shremps-mxmlZQOcN5FapMUrq6

netlify[bot] commented 3 weeks ago

Deploy Preview for analog-docs ready!

Name Link
Latest commit ce395f20b61082fb17dacddd761c77086bc3fbfa
Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/66de1348a2f2720008cf92ff
Deploy Preview https://deploy-preview-1330--analog-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 3 weeks ago

Deploy Preview for analog-app ready!

Name Link
Latest commit ce395f20b61082fb17dacddd761c77086bc3fbfa
Latest deploy log https://app.netlify.com/sites/analog-app/deploys/66de1348e4c2bb0008452804
Deploy Preview https://deploy-preview-1330--analog-app.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 3 weeks ago

Deploy Preview for analog-blog ready!

Name Link
Latest commit ce395f20b61082fb17dacddd761c77086bc3fbfa
Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/66de13482256a5000863ab4c
Deploy Preview https://deploy-preview-1330--analog-blog.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 3 weeks ago

Deploy Preview for analog-ng-app ready!

Name Link
Latest commit ce395f20b61082fb17dacddd761c77086bc3fbfa
Latest deploy log https://app.netlify.com/sites/analog-ng-app/deploys/66de1348bedcb000086fb401
Deploy Preview https://deploy-preview-1330--analog-ng-app.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

brandonroberts commented 3 weeks ago

Thanks @ilyassFouih. The template file that was updated was for angular v15. Was this intentional? The latest/v18 template is here

https://github.com/analogjs/analog/blob/beta/packages/nx-plugin/src/generators/app/files/template-angular-v18/.eslintrc.json__template__

ilyassFouih commented 3 weeks ago

Thanks @ilyassFouih. The template file that was updated was for angular v15. Was this intentional? The latest/v18 template is here

https://github.com/analogjs/analog/blob/beta/packages/nx-plugin/src/generators/app/files/template-angular-v18/.eslintrc.json__template__ Apologies for not checking the Eslint template for other versions as I was using v15. I have updated them all now. Let me know what you think.

brandonroberts commented 2 weeks ago

Thanks! @allcontributors add @ilyassFouih for code

allcontributors[bot] commented 2 weeks ago

@brandonroberts

I've put up a pull request to add @ilyassFouih! :tada: