You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/no-unused-props.md
+18
Original file line number
Diff line number
Diff line change
@@ -163,13 +163,16 @@ Note: Properties of class types are not checked for usage, as they might be used
163
163
"ignoreTypePatterns": [],
164
164
// Patterns to ignore when checking for unused props
165
165
"ignorePropertyPatterns": [],
166
+
// Whether to allow unused nested properties
167
+
"allowUnusedNestedProperties":false
166
168
}]
167
169
}
168
170
```
169
171
170
172
-`checkImportedTypes` ... Controls whether to check properties from types defined in external files. Default is `false`, meaning the rule only checks types defined within the component file itself. When set to `true`, the rule will also check properties from imported and extended types.
171
173
-`ignoreTypePatterns` ... Regular expression patterns for type names to exclude from checks. Default is `[]` (no exclusions). Most useful when `checkImportedTypes` is `true`, allowing you to exclude specific imported types (like utility types or third-party types) from being checked.
172
174
-`ignorePropertyPatterns` ... Regular expression patterns for property names to exclude from unused checks. Default is `[]` (no exclusions). Most useful when `checkImportedTypes` is `true`, allowing you to ignore specific properties from external types that shouldn't trigger warnings.
175
+
-`allowUnusedNestedProperties` ... Controls whether to allow unused nested properties. Default is `false`, meaning the rule will report unused properties from nested objects.
173
176
174
177
Examples:
175
178
@@ -219,6 +222,21 @@ Examples:
219
222
</script>
220
223
```
221
224
225
+
```svelte
226
+
<!-- ✓ Good Example with allowUnusedNestedProperties: true -->
0 commit comments