在ESLint之后尝试添加ngrx store时出现错误



我有一个angular 13应用,ESLint已经就位了。

我已经添加了ngrx存储和开发工具使用


ng add @ngrx/store
ng add @ngrx/store-devtools

命令。现在当我尝试添加store

ng g store shared/Shared --module shared.module.ts      

我得到一个错误

发生未处理的异常:Schematic "store"@angular-eslint/schematics"

.eslintrc文件有变化

},
{
"files": [
"*.ts"
],
"extends": [
"plugin:ngrx/recommended"
]
}

和角。Json有这个条目

"cli": {
"defaultCollection": "@angular-eslint/schematics"
}

如何保留ESLint并使ngrx与它一起工作?

默认集合应该是来自NgRx的集合,或者您应该通过显式添加原理图来执行原理图。

"cli": {
"defaultCollection": "@ngrx/schematics"
}

ng generate @ngrx/schematics:store shared/Shared --module shared.module.ts      

最新更新