mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-19 10:52:04 +00:00
chore: enable react/no-object-type-as-default-prop rule
This commit is contained in:
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,
|
||||
|
||||
Reference in New Issue
Block a user