You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not quite clear why that should be valid. Generally only classes and JSX functions should be in pascal case. RegisterServiceError is neither so it should be registerServiceError and it's automatically ignored by the rule.
Said so, using PascalCase only for classes and components is a naming convention, not a js requirement.
It’s like getting a false positive because the line is indented with tabs instead of with spaces.
This plugin should not rely on such conventions and/or allow the user to configure alternative regexes or exceptions
after last release throw new error reports any call to function that are PascalCase and contains the word “Error” as invalid.
Example:
‘’’
const ParseError = () => 0;
// this is reported as invalid
cont result = ParseError();
‘’’
In my specific case I’m getting the error when using a class decorator to track custom error classes
‘’’
@RegisterServiceError()
class SomeError extends BaseError {}
’’’
easiest solution would be to at least allow a list of name exceptions to the rule.
The text was updated successfully, but these errors were encountered: