Avoid redundant configuration parameters and prefer automated solutions over manual maintenance. Remove configuration options that duplicate library defaults, replace manual dependency lists with programmatic detection, and eliminate unused configuration logic when usage patterns change.
Avoid redundant configuration parameters and prefer automated solutions over manual maintenance. Remove configuration options that duplicate library defaults, replace manual dependency lists with programmatic detection, and eliminate unused configuration logic when usage patterns change.
Key practices:
argv: process.argv.slice(2)
when it’s already the default)external: (id) => isBareModuleId(id)
instead of maintaining a hardcoded external dependencies array)transformIgnorePatterns: []
instead of complex modulePaths
setup)Example of improvement:
// Before: Redundant and manual
let args = arg({}, { argv: process.argv.slice(2), stopAtPositional: true });
external: ["history", "@remix-run/router", "react", "react-dom"]
// After: Simplified and automated
let args = arg({}, { permissive: true });
external: (id) => isBareModuleId(id)
This approach reduces maintenance burden, prevents configuration drift, and ensures setups work consistently across different environments and package managers.
Enter the URL of a public GitHub repository