@@ -1,7 +1,11 @@
engine biome(1.0)
language js(typescript)
-`$obj.populate($args)` where {
+// Match any populate method call
+or {
+ `$obj.populate($_)`,
+ `$obj.populate<$type>($_)`
+} where {
register_diagnostic(
span=$obj,
message="The 'populate' method should not be called in model modules. Consider restructuring your code to avoid using populate in model files."
@@ -1426,7 +1426,7 @@ schema.methods.calculateAndUpdateLatestRevisionBodyLength = async function (
return;
}
- // eslint-disable-next-line rulesdir/no-populate
+ // biome-ignore lint/plugin: allow populate for backward compatibility
const populatedPageDocument = await this.populate<PageDocument>(
'revision',
'body',