ngrx / platform

Reactive State for Angular
https://ngrx.io
Other
7.97k stars 1.96k forks source link

ng schematic does not recognise .eslintrc.cjs files #3583

Open michahell opened 1 year ago

michahell commented 1 year ago

Which @ngrx/* package(s) are the source of the bug?

eslint-plugin

Minimal reproduction of the bug/regression with instructions

  1. have any project
  2. with a .eslintrc.cjs file (see: https://eslint.org/docs/latest/user-guide/configuring/configuration-files)
  3. try to install ngrx-eslint-plugin using schematics (https://ngrx.io/guide/eslint-plugin/install)
  4. eslintrc.json can not be found error:
Screenshot 2022-09-20 at 15 37 58

Minimal reproduction of the bug/regression with instructions

installation via schematic finds eslint config file and proceeds.

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)

latest angular latest ngrx-eslint-plugin latest eslint latest anything

Other information

No response

I would be willing to submit a PR to fix this issue

timdeschryver commented 1 year ago

Drop your name here if you want to pick this up.

JeromeWirth commented 8 months ago

I'm interested in taking this issue.

I've looked around and found the addNgRxESLintPlugin() function in modules\store\schematics\ng-add\index.ts and modules\eslint-plugin\schematics\ng-add\index.ts, which should get updated.

I'm wondering, if all the other formats should also be supported?

timdeschryver commented 8 months ago

@JeromeWirth the JS and JSON variants are good for now. We can always add support for more later when it's needed.