cli.d.ts 728 B

1234567891011121314
  1. import { type OutputConfiguration } from 'commander';
  2. import * as editorconfig from './';
  3. /**
  4. * Command line interface for editorconfig. Pulled out into a separate module
  5. * to make it easier to test.
  6. *
  7. * @param args Usually process.argv. Note that the first two parameters are
  8. * usually 'node' and 'editorconfig'
  9. * @param testing If testing, you may pass in a Commander OutputConfiguration
  10. * so that you can capture stdout and stderror. If `testing` is provided,
  11. * this routine will throw an error instead of calling `process.exit`.
  12. * @returns An array of combined properties, one for each file argument.
  13. */
  14. export default function cli(args: string[], testing?: OutputConfiguration): Promise<editorconfig.Props[]>;