chore: enable react/no-object-type-as-default-prop rule

This commit is contained in:
Julian Sommer
2026-07-14 10:27:29 +10:00
parent 9a8b5bd841
commit 8552937c86
5 changed files with 16 additions and 6 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -25,7 +25,6 @@ export default defineConfig({
"@tanstack/router/create-route-property-order": "error",
"@tanstack/router/route-param-names": "error",
"react/jsx-handler-names": "off",
"react/no-object-type-as-default-prop": "off",
"eslint/complexity": "off",
"eslint/func-style": [
"error",
@@ -35,6 +35,8 @@ interface ListenerFormProps {
const HTTP_PORT = 80
const HTTPS_PORT = 443
const EMPTY_CERTIFICATES: CertificateSummary[] = []
const EMPTY_SSL_POLICIES: SslPolicy[] = []
function certLabel(cert: CertificateSummary): string {
const id = cert.CertificateArn?.split("/").pop() ?? cert.CertificateArn ?? ""
@@ -45,8 +47,8 @@ export function ListenerForm({
form,
protocols,
targetGroups,
certificates = [],
sslPolicies = [],
certificates = EMPTY_CERTIFICATES,
sslPolicies = EMPTY_SSL_POLICIES,
}: ListenerFormProps) {
const {
control,
@@ -27,10 +27,19 @@ interface TargetGroupFormProps {
allowedProtocols?: readonly string[]
}
const DEFAULT_ALLOWED_PROTOCOLS = [
"HTTP",
"HTTPS",
"TCP",
"UDP",
"TLS",
"TCP_UDP",
] as const
export function TargetGroupForm({
form,
vpcs,
allowedProtocols = ["HTTP", "HTTPS", "TCP", "UDP", "TLS", "TCP_UDP"],
allowedProtocols = DEFAULT_ALLOWED_PROTOCOLS,
}: TargetGroupFormProps) {
const {
control,