ESLINT : Component-selector (Angular)

Viewed 2589

Using Angular 11 . I have Issue with Eslint Issue

I have Component selector with class and also other as element

 @Component ({
  selector : ".myApp",
  ..
 })

How do I add the check in rules inside

@angulareslint/componentselector

that my component selector "my" and selector type element and class .

1 Answers

I believe the following rule should work:

"@angular-eslint/component-selector": [
  "error",
  {
    "prefix": [ "my", ".my" ]
  }
]
Related