From ec161cdef36d7b588d2f8c6c26e99d6c4d10a374 Mon Sep 17 00:00:00 2001 From: Andrew Aquino Date: Sat, 12 Sep 2026 00:53:55 +0000 Subject: [PATCH] chore(site): enable jsx-curly-brace-presence oxlint rule --- site/.oxlintrc.jsonc | 2 +- site/src/components/TagInput/TagInput.tsx | 2 +- site/src/modules/resources/AgentExternal.tsx | 2 +- .../TemplateInsightsPage.tsx | 94 +++++++++---------- 4 files changed, 49 insertions(+), 51 deletions(-) diff --git a/site/.oxlintrc.jsonc b/site/.oxlintrc.jsonc index d42bc11d2f278..2409bbe855e5a 100644 --- a/site/.oxlintrc.jsonc +++ b/site/.oxlintrc.jsonc @@ -134,6 +134,7 @@ "one-var": ["error", "never"], "prefer-number-properties": ["error", { "checkInfinity": true }], "no-else-return": ["error", { "allowElseIf": false }], + "jsx-curly-brace-presence": "error", // --- suspicious --- "no-cond-assign": "error", @@ -207,7 +208,6 @@ "no-invalid-void-type": "off", // suspicious/noConfusingVoidType (large) "no-redeclare": "off", // suspicious/noRedeclare (medium: TS declaration merging) "no-inferrable-types": "off", // style/noInferrableTypes (medium, coder error rule) - "jsx-curly-brace-presence": "off", // style/useConsistentCurlyBraces (medium, coder error rule) "no-fallthrough": "off", // suspicious/noFallthroughSwitchClause (medium) "click-events-have-key-events": "off", // a11y/useKeyWithClickEvents (small) "prefer-function-type": "off", // style/useShorthandFunctionType (small) diff --git a/site/src/components/TagInput/TagInput.tsx b/site/src/components/TagInput/TagInput.tsx index 7588950d91f8c..b014d048c465c 100644 --- a/site/src/components/TagInput/TagInput.tsx +++ b/site/src/components/TagInput/TagInput.tsx @@ -83,7 +83,7 @@ export const TagInput: FC = ({

- {'Type "," to separate the values'} + Type "," to separate the values

); diff --git a/site/src/modules/resources/AgentExternal.tsx b/site/src/modules/resources/AgentExternal.tsx index 1ea0645096e9b..3ed40d72ca45b 100644 --- a/site/src/modules/resources/AgentExternal.tsx +++ b/site/src/modules/resources/AgentExternal.tsx @@ -37,7 +37,7 @@ export const AgentExternal: FC = ({ agent, workspace }) => { code={credentials?.command ?? ""} secret={false} redactPattern={/CODER_AGENT_TOKEN="([^"]+)"/g} - redactReplacement={`CODER_AGENT_TOKEN="********"`} + redactReplacement='CODER_AGENT_TOKEN="********"' showRevealButton /> diff --git a/site/src/pages/TemplatePage/TemplateInsightsPage/TemplateInsightsPage.tsx b/site/src/pages/TemplatePage/TemplateInsightsPage/TemplateInsightsPage.tsx index dee23d580bd0d..fa32bb056fa86 100644 --- a/site/src/pages/TemplatePage/TemplateInsightsPage/TemplateInsightsPage.tsx +++ b/site/src/pages/TemplatePage/TemplateInsightsPage/TemplateInsightsPage.tsx @@ -442,57 +442,55 @@ const TemplateUsagePanel: FC = ({ App & IDE Usage - { -
- {(validUsage || []).map((usage, i) => { - const percentage = (usage.seconds / totalInSeconds) * 100; - const colorStop = - usageCount <= 1 ? 0 : (i / (usageCount - 1)) * 100; - return ( -
-
-
- -
-
- {usage.display_name} -
+
+ {(validUsage || []).map((usage, i) => { + const percentage = (usage.seconds / totalInSeconds) * 100; + const colorStop = + usageCount <= 1 ? 0 : (i / (usageCount - 1)) * 100; + return ( +
+
+
+
- - -
-
-
- - - {Math.floor(percentage)}% - - - -
- {formatTime(usage.seconds)} - {usage.times_used > 0 && ( - - Opened {usage.times_used.toLocaleString()}{" "} - {usage.times_used === 1 ? "time" : "times"} - - )} +
+ {usage.display_name}
- ); - })} -
- } + + +
+
+
+ + + {Math.floor(percentage)}% + + + +
+ {formatTime(usage.seconds)} + {usage.times_used > 0 && ( + + Opened {usage.times_used.toLocaleString()}{" "} + {usage.times_used === 1 ? "time" : "times"} + + )} +
+
+ ); + })} +
);