cli-options-verbose.txt 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. tslint accepts the following commandline options:
  2. -f, --file:
  3. The location of the TypeScript file that you wish to lint. This
  4. option is required.
  5. -c, --config:
  6. The location of the configuration file that tslint will use to
  7. determine which rules are activated and what options to provide
  8. to the rules. If no option is specified, the config file named
  9. tslint.json is used, so long as it exists in the path.
  10. The format of the file is { rules: { /* rules list */ } },
  11. where /* rules list */ is a key: value comma-seperated list of
  12. rulename: rule-options pairs. Rule-options can be either a
  13. boolean true/false value denoting whether the rule is used or not,
  14. or a list [boolean, ...] where the boolean provides the same role
  15. as in the non-list case, and the rest of the list are options passed
  16. to the rule that will determine what it checks for (such as number
  17. of characters for the max-line-length rule, or what functions to ban
  18. for the ban rule).
  19. -o, --out:
  20. A filename to output the results to. By default, tslint outputs to
  21. stdout, which is usually the console where you're running it from.
  22. -r, --rules-dir:
  23. An additional rules directory, for user-created rules.
  24. tslint will always check its default rules directory, in
  25. node_modules/tslint/build/rules, before checking the user-provided
  26. rules directory, so rules in the user-provided rules directory
  27. with the same name as the base rules will not be loaded.
  28. -s, --formatters-dir:
  29. An additional formatters directory, for user-created formatters.
  30. Formatters are files that will format the tslint output, before
  31. writing it to stdout or the file passed in --out. The default
  32. directory, node_modules/tslint/build/formatters, will always be
  33. checked first, so user-created formatters with the same names
  34. as the base formatters will not be loaded.
  35. -t, --format:
  36. The formatter to use to format the results of the linter before
  37. outputting it to stdout or the file passed in --out. The core
  38. formatters are prose (human readable) and json (machine readable),
  39. and prose is the default if this option is not used. Additonal
  40. formatters can be added and used if the --formatters-dir option
  41. is set.
  42. --help:
  43. Prints this help message.