12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. export interface Options {
  2. /**
  3. * Path to a configuration file.
  4. */
  5. config?: string;
  6. /**
  7. * Exclude globs from path expansion.
  8. */
  9. exclude: string[];
  10. /**
  11. * File paths to lint.
  12. */
  13. files: string[];
  14. /**
  15. * Whether to return status code 0 even if there are lint errors.
  16. */
  17. force?: boolean;
  18. /**
  19. * Whether to fixes linting errors for select rules. This may overwrite linted files.
  20. */
  21. fix?: boolean;
  22. /**
  23. * Output format.
  24. */
  25. format?: string;
  26. /**
  27. * Formatters directory path.
  28. */
  29. formattersDirectory?: string;
  30. /**
  31. * Whether to generate a tslint.json config file in the current working directory.
  32. */
  33. init?: boolean;
  34. /**
  35. * Output file path.
  36. */
  37. out?: string;
  38. /**
  39. * Whether to output absolute paths
  40. */
  41. outputAbsolutePaths?: boolean;
  42. /**
  43. * tsconfig.json file.
  44. */
  45. project?: string;
  46. /**
  47. * Rules directory paths.
  48. */
  49. rulesDirectory?: string | string[];
  50. /**
  51. * Run the tests in the given directories to ensure a (custom) TSLint rule's output matches the expected output.
  52. * When this property is `true` the `files` property is used to specify the directories from which the tests should be executed.
  53. */
  54. test?: boolean;
  55. /**
  56. * Whether to enable type checking when linting a project.
  57. */
  58. typeCheck?: boolean;
  59. }
  60. export declare const enum Status {
  61. Ok = 0,
  62. FatalError = 1,
  63. LintError = 2,
  64. }
  65. export interface Logger {
  66. log(message: string): void;
  67. error(message: string): void;
  68. }
  69. export declare function run(options: Options, logger: Logger): Promise<Status>;