在我的NX工作区中,我有一个NestJS-Angular项目。当我运行nx lint
时,我得到以下错误:
Error: You have attempted to use a lint rule which requires the full TypeScript type-checker to be available, but you do not have `parserOptions.project` configured to point at your project tsconfig.json files in the relevant TypeScript file "overrides" block of your project ESLint config `apps/client/.eslintrc.json`
Please see https://nx.dev/guides/eslint for full guidance on how to resolve this issue.
我已经浏览了上面提到的链接,正如你所看到的,我已经在我的.eslintrc.json
文件中添加了parserOptions.project
,但是错误仍然存在。
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["/apps/client/tsconfig.*?.json"]
},
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "learning",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "learning",
"style": "kebab-case"
}
],
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "off",
"@angular-eslint/no-empty-lifecycle-method": "off"
}
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"rules": {}
}
]
}
任何帮助都将不胜感激。
1条答案
按热度按时间wgxvkvu91#
删除应用程序/客户端中解析器Options.project中的斜线