| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- tslint accepts the following commandline options:
- -f, --file:
- The location of the TypeScript file that you wish to lint. This
- option is required.
- -c, --config:
- The location of the configuration file that tslint will use to
- determine which rules are activated and what options to provide
- to the rules. If no option is specified, the config file named
- tslint.json is used, so long as it exists in the path.
- The format of the file is { rules: { /* rules list */ } },
- where /* rules list */ is a key: value comma-seperated list of
- rulename: rule-options pairs. Rule-options can be either a
- boolean true/false value denoting whether the rule is used or not,
- or a list [boolean, ...] where the boolean provides the same role
- as in the non-list case, and the rest of the list are options passed
- to the rule that will determine what it checks for (such as number
- of characters for the max-line-length rule, or what functions to ban
- for the ban rule).
- -o, --out:
- A filename to output the results to. By default, tslint outputs to
- stdout, which is usually the console where you're running it from.
- -r, --rules-dir:
- An additional rules directory, for user-created rules.
- tslint will always check its default rules directory, in
- node_modules/tslint/build/rules, before checking the user-provided
- rules directory, so rules in the user-provided rules directory
- with the same name as the base rules will not be loaded.
- -s, --formatters-dir:
- An additional formatters directory, for user-created formatters.
- Formatters are files that will format the tslint output, before
- writing it to stdout or the file passed in --out. The default
- directory, node_modules/tslint/build/formatters, will always be
- checked first, so user-created formatters with the same names
- as the base formatters will not be loaded.
- -t, --format:
- The formatter to use to format the results of the linter before
- outputting it to stdout or the file passed in --out. The core
- formatters are prose (human readable) and json (machine readable),
- and prose is the default if this option is not used. Additonal
- formatters can be added and used if the --formatters-dir option
- is set.
- --help:
- Prints this help message.
|