eslint-plugin-unicorn icon indicating copy to clipboard operation
eslint-plugin-unicorn copied to clipboard

Camelcase replacements don't work

Open its-dibo opened this issue 2 years ago • 0 comments

I want to allow this abbr elementRef: ElementRef as it a well known term in Angular

replacements:[
  // those don't work
   elementRef: false,
   ElementRef: false,
   Ref: false,

  // only this works
    ref: false
]

I want to allow ref inside elementRef only also, mixed-case should be respected, thus Ref should only match Ref and elementRef but not ref

elementRef in the configuration above doesn't match itself, but in docs:

Camelcase replacements will only match complete identifiers. For example errCb will only match errCb and ErrCb. It will not match fooErrCb or errCbFoo.

its-dibo avatar Jun 02 '22 22:06 its-dibo