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
The rule currently doesn't check object literal properties.
Typically there is a contextual type for the object literal, i.e. the variable you are assigning the object to is typed by an interface. If that interface is declared in your code, it is already linted by this rule. If it's from an external dependency, you most likely don't have control over the naming.
For example GitHub's API uses snake_case for option properties. You need to follow this naming convention when using the API but don't want to change the rule for the rest of your code. Therefore I think linting object literal properties is not a good idea.
I have rules that set the naming-convention to camelCase by default, but it does not work for object variables.
Example: The
Test
name should be flagged as a rule violation, but it is not.Here is the rule I am using:
{"type": "default", "format": "camelCase", "leadingUnderscore": "forbid", "trailingUnderscore": "forbid"},
The text was updated successfully, but these errors were encountered: