Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Update docs with recent changes (#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkillian committed Apr 21, 2016
1 parent 9a08bf0 commit f6b64cb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,17 @@ usage: `tslint [options] [file ...]`
Options:

```
-c, --config configuration file
-o, --out output file
-r, --rules-dir rules directory
-s, --formatters-dir formatters directory
-t, --format output format (prose, json) [default: "prose"]
-c, --config configuration file
--force return status code 0 even if there are lint errors
-h, --help display detailed help
-i, --init generate a tslint.json config file in the current working directory
-o, --out output file
-r, --rules-dir rules directory
-s, --formatters-dir formatters directory
-e, --exclude exclude globs from path expansion
-t, --format output format (prose, json, verbose, pmd, msbuild, checkstyle) [default: "prose"]
--test test that tslint produces the correct output for the specified directory
-v, --version current version
```

By default, configuration is loaded from `tslint.json`, if it exists in the current path, or the user's home directory, in that order.
Expand Down Expand Up @@ -130,7 +136,8 @@ tslint accepts the following command-line options:
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), json (machine readable)
and verbose. prose is the default if this option is not used. Additonal
and verbose. prose is the default if this option is not used.
Other built-in options include pmd, msbuild, and checkstyle. Additonal
formatters can be added and used if the --formatters-dir option is set.
--test:
Expand Down Expand Up @@ -194,7 +201,7 @@ A sample configuration file with all options is available [here](https://github.
* `"check-uppercase"` enforces the rule that the first non-whitespace character of a comment must be uppercase, if applicable.
* `curly` enforces braces for `if`/`for`/`do`/`while` statements.
* `eofline` enforces the file to end with a newline.
* `forin` enforces a `for ... in` statement to be filtered with an `if` statement.*
* `forin` enforces a `for ... in` statement to be filtered with an `if` statement.
* `indent` enforces indentation with tabs or spaces. Rule options (one is required):
* `"tabs"` enforces consistent tabs.
* `"spaces"` enforces consistent spaces.
Expand Down Expand Up @@ -234,8 +241,9 @@ A sample configuration file with all options is available [here](https://github.
* `no-eval` disallows `eval` function invocations.
* `no-inferrable-types` disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
* `no-internal-module` disallows internal `module` (use `namespace` instead).
* `no-null-keyword` disallows use of the `null` keyword literal
* `no-reference` disallows `/// <reference>` imports (use ES6-style imports instead).
* `no-invalid-this` disallows using the `this` keyword outside of classes.
* `no-null-keyword` disallows use of the `null` keyword literal.
* `no-reference` disallows `/// <reference path=>` imports (use ES6-style imports instead).
* `no-require-imports` disallows invocation of `require()` (use ES6-style imports instead).
* `no-shadowed-variable` disallows shadowed variable declarations.
* `no-string-literal` disallows object access via string literals.
Expand Down Expand Up @@ -293,7 +301,7 @@ A sample configuration file with all options is available [here](https://github.
* `"parameter"` checks function parameters.
* `"property-declaration"` checks object property declarations.
* `"variable-declaration"` checks variable declaration.
* `use-isnan` enforces that you use the isNaN() function to check for NaN references instead of a comparison to the NaN constant. Similar to the [use-isnan ESLint rule](http://eslint.org/docs/rules/use-isnan).
* `use-isnan` enforces that you use the isNaN() function to check for NaN references instead of a comparison to the NaN constant.
* `use-strict` enforces ECMAScript 5's strict mode.
* `check-module` checks that all top-level modules are using strict mode.
* `check-function` checks that all top-level functions are using strict mode.
Expand Down
3 changes: 3 additions & 0 deletions docs/sample.tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
"no-eval": true,
"no-inferrable-types": false,
"no-internal-module": true,
"no-invalid-this": true,
"no-null-keyword": true,
"no-reference": true,
"no-require-imports": true,
"no-shadowed-variable": true,
"no-string-literal": true,
Expand Down Expand Up @@ -134,6 +136,7 @@
"variable-declaration": "space"
}
],
"use-isnan": true,
"use-strict": [
true,
"check-module",
Expand Down
5 changes: 3 additions & 2 deletions src/tslint-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ let processed = optimist
"t": {
alias: "format",
default: "prose",
describe: "output format (prose, json, verbose)",
describe: "output format (prose, json, verbose, pmd, msbuild, checkstyle)",
},
"test": {
describe: "test that tslint produces the correct output for the specified directory",
Expand Down Expand Up @@ -174,7 +174,8 @@ tslint accepts the following commandline options:
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), json (machine readable)
and verbose. prose is the default if this option is not used. Additonal
and verbose. prose is the default if this option is not used.
Other built-in options include pmd, msbuild, and checkstyle. Additonal
formatters can be added and used if the --formatters-dir option is set.
--test:
Expand Down

0 comments on commit f6b64cb

Please sign in to comment.