I have an Angular 12 solution that has two projects: one that is a library and one that is an app. I converted these from using tslint to eslint. I used the following commands:
ng add @angular-eslint/schematics
ng g @angular-eslint/schematics:convert-tslint-to-eslint my-app
ng g @angular-eslint/schematics:convert-tslint-to-eslint my-library
My library uses a different prefix from the app. When I run ng lint I get the following error:
The selector should start with one of these prefixes: "app" (https://angular.io/guide/styleguide#style-02-07) @angular-eslint/component-selector
I have a .eslintrc.json file in the root directory and in the top project directories for the app and lib. I tried changing the entry for component-selector prefix to lib in the .eslintrc.json file from my library project folder:
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "lib",
"style": "kebab-case"
}
]
}
This doesn't fix the problem. How do I regester my custom prefix for my library to make this error go away?