Skip to content

Commit 7b9446f

Browse files
authored
docs: handle empty flags sections on the feature flags page (#20222)
1 parent 8fe511b commit 7b9446f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/src/pages/flags.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The following policies apply to `unstable_` flags.
3434

3535
## Active Flags
3636

37+
{% if flags.active | length %}
3738
The following flags are currently available for use in ESLint.
3839

3940
<table>
@@ -49,9 +50,13 @@ The following flags are currently available for use in ESLint.
4950
{%- endfor -%}
5051
</tbody>
5152
</table>
53+
{% else %}
54+
There are currently no active flags.
55+
{% endif %}
5256

5357
## Inactive Flags
5458

59+
{% if flags.inactive | length %}
5560
The following flags were once used but are no longer active.
5661

5762
<table>
@@ -68,6 +73,9 @@ The following flags were once used but are no longer active.
6873
{%- endfor -%}
6974
</tbody>
7075
</table>
76+
{% else %}
77+
There are currently no inactive flags.
78+
{% endif %}
7179

7280
## How to Use Feature Flags
7381

0 commit comments

Comments
 (0)