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: Documentation/Configuration.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -296,6 +296,19 @@ too long.
296
296
297
297
**default:**`false`
298
298
299
+
---
300
+
301
+
### `orderedImports`
302
+
**type:** object
303
+
304
+
**description:** Configuration for the `OrderedImports` rule.
305
+
306
+
-`includeConditionalImports`_(boolean)_: Determines whether imports within conditional compilation blocks (`#if`, `#elseif`, `#else`) should be ordered. When `true`, imports inside conditional blocks will be sorted and organized according to the same rules as top-level imports. When `false`, imports within conditional blocks are left in their original order.
Copy file name to clipboardExpand all lines: Documentation/RuleDocumentation.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -411,6 +411,9 @@ The order of the import groups is 1) regular imports, 2) declaration imports, 3)
411
411
imports, and 4) @testable imports. These groups are separated by a single blank line. Blank lines in
412
412
between the import declarations are removed.
413
413
414
+
By default, imports within conditional compilation blocks (`#if`, `#elseif`, `#else`) are not ordered. This behavior can be controlled via the `orderedImports.includeConditionalImports`
415
+
configuration option.
416
+
414
417
Lint: If an import appears anywhere other than the beginning of the file it resides in,
415
418
not lexicographically ordered, or not in the appropriate import group, a lint error is
0 commit comments