Skip to main content

incorrect-firebase-event-name

added in: 1.21.0
Pro+

Warns when the event name does not comply with Firebase limitations.

Firebase requires the event name to contain 1 to 40 alphanumeric characters or underscores and start with an alphabetic character.

Additional resources:

Example

❌ Bad:

void fn() {
_analytics.logEvent(name: ''); // LINT
_analytics.logEvent(name: '😅'); // LINT
_analytics.logEvent(name: '_'); // LINT
}

✅ Good:

void fn() {
_analytics.logEvent(name: 'correct_name');
}