Skip to content

⬅️ Back to Table of Contents

📄 omitCustomConfigProperties.ts

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 1
📊 Variables & Constants 1

📚 Table of Contents

🛠️ File Location:

📂 packages/rule-tester/src/utils/omitCustomConfigProperties.ts

📦 Imports

Name Source
RuleTesterConfig ../types/RuleTesterConfig

Variables & Constants

Name Type Kind Value Exported
copy { defaultFilenames?: Readonly<{ ts: string; tsx: string; }>; dependencyConstraints?: Readonly<Record<string, VersionConstraint>>; } const { ...config }

Functions

omitCustomConfigProperties(config: Partial<RuleTesterConfig>): Omit<typeof config, 'defaultFilenames'>

Code
export function omitCustomConfigProperties(
  config: Partial<RuleTesterConfig>,
): Omit<typeof config, 'defaultFilenames'> {
  const copy = { ...config };

  delete copy.defaultFilenames;
  delete copy.dependencyConstraints;

  return copy;
}
  • Parameters:
  • config: Partial<RuleTesterConfig>
  • Return Type: Omit<typeof config, 'defaultFilenames'>