isEnabled method
Checks whether this lint rule is enabled in a configuration file.
If a lint is neither enabled nor disabled by a configuration file, enabledByDefault will be checked.
Implementation
bool isEnabled(CustomLintConfigs configs) {
return configs.rules[code.name]?.enabled ??
configs.enableAllLintRules ??
enabledByDefault;
}