- const patterns = schemaProperties(it, schema)
- // TODO mark properties matching patterns with always valid schemas as evaluated
- if (patterns.length === 0) return
+ const patterns = allSchemaProperties(schema)
+ const alwaysValidPatterns = patterns.filter((p) =>
+ alwaysValidSchema(it, schema[p] as AnySchema)
+ )
+
+ if (
+ patterns.length === 0 ||
+ (alwaysValidPatterns.length === patterns.length &&
+ (!it.opts.unevaluated || it.props === true))
+ ) {
+ return
+ }
+