Issue
I have an angular 13 application with ESLent already in place.
I have added ngrx store and dev tools using
ng add @ngrx/store
ng add @ngrx/store-devtools
commands. now that when I try to add store
ng g store shared/Shared --module shared.module.ts      
I get an error
An unhandled exception occurred: Schematic "store" not found in collection "@angular-eslint/schematics".
.eslintrc file has changes
},
{
  "files": [
    "*.ts"
  ],
  "extends": [
    "plugin:ngrx/recommended"
  ]
}
and angular.json has this entry
  "cli": {
"defaultCollection": "@angular-eslint/schematics"
}
how can I retain ESLint and make ngrx work with it ?
Solution
The default collection should be the one from NgRx, or you should execute the schematic by explicitly adding the schematic.
  "cli": {
"defaultCollection": "@ngrx/schematics"
}
or
ng generate @ngrx/schematics:store shared/Shared --module shared.module.ts      
                            Answered By - timdeschryver
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.