sindresorhus/eslint-plugin-unicorn
`prevent-abbreviations` - Allow multi-part exceptions
Closed
#1,839 opened on Jun 2, 2022
enhancementhelp wanted
Repository metrics
- Stars
- (5,022 stars)
- PR merge metrics
- (Avg merge 1d 16h) (399 merged PRs in 30d)
Description
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.