incorrect-firebase-parameter-name
Warns when the parameter name does not comply with Firebase limitations.
Firebase requires the parameter name to contain 1 to 40 alphanumeric characters or underscores and start with an alphabetic character.
Additional resources:
- https://firebase.google.com/docs/reference/cpp/group/parameter-names
- https://firebase.google.com/docs/analytics/errors
Example
❌ Bad:
void fn() {
_analytics.logEvent(name: '', parameters: {
'some-name': 'str', // LINT
'': 'str', // LINT
});
}
✅ Good:
void fn() {
_analytics.logEvent(name: '', parameters: {
'some_name': 'str',
});
_analytics.logSignUp(signUpMethod: '', parameters: {
'correct_param': 'str',
});
}