platform icon indicating copy to clipboard operation
platform copied to clipboard

ng schematic does not recognise .eslintrc.cjs files

Open michahell opened this issue 3 years ago • 3 comments

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

  • [ ] Yes
  • [X] No

michahell avatar Sep 20 '22 13:09 michahell

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

timdeschryver avatar Sep 21 '22 11:09 timdeschryver

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?

JeromeWirth avatar Nov 17 '23 20:11 JeromeWirth

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

timdeschryver avatar Nov 18 '23 18:11 timdeschryver