Proactively remove configuration options that are no longer functional or relevant to prevent developer confusion and potential bugs. When configuration options become obsolete due to architectural changes or package migrations, removing them from type definitions and interfaces is preferable to keeping them as non-functional placeholders.
Proactively remove configuration options that are no longer functional or relevant to prevent developer confusion and potential bugs. When configuration options become obsolete due to architectural changes or package migrations, removing them from type definitions and interfaces is preferable to keeping them as non-functional placeholders.
This approach provides several benefits:
For example, when a timeout configuration becomes non-functional:
// Before: Keeping obsolete option
export interface ServerRouterProps {
context: EntryContext;
url: string | URL;
abortDelay?: number; // Non-functional but still present
}
// After: Remove and force migration
export interface ServerRouterProps {
context: EntryContext;
url: string | URL;
// Use streamTimeout instead of abortDelay
}
Similarly, when packages become obsolete due to tooling changes, update imports and remove references:
// Before: Obsolete package import
import { cssBundleHref } from "@remix-run/css-bundle";
// After: Updated or removed based on new tooling
// Package removed as it's obsolete in vite-only environments
The resulting TypeScript errors serve as helpful migration guides, alerting developers to update their configuration and fix potential functional issues.
Enter the URL of a public GitHub repository