Skip to content

Commit

Permalink
Fix document bug in strict-boolean-expressions and the contributing d…
Browse files Browse the repository at this point in the history
  • Loading branch information
usuyama authored and nchen63 committed Feb 7, 2017
1 parent 290d597 commit 8193753
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/develop/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ The current debug configurations are:
- Debug CLI: Used to debug TSLint using command line arguments. Modify the `args` array in `.vscode/launch.json` to add arguments.
- Debug Mocha Tests: Runs non-rule tests
- Debug Rule Tests: Runs rule tests (under `test/rules`)
- Deubg Document Generation: Debug the `scripts/buildDocs.ts` script.
- Debug Document Generation: Debug the `scripts/buildDocs.ts` script.
29 changes: 15 additions & 14 deletions src/rules/strictBooleanExpressionsRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,26 @@ export class Rule extends Lint.Rules.TypedRule {
Restricts the types allowed in boolean expressions. By default only booleans are allowed.
The following nodes are checked:
* Arguments to the '!', '&&', and '||' operators
* The condition in a conditional expression ('cond ? x : y')
* Conditions for 'if', 'for', 'while', and 'do-while' statements.`,
* Arguments to the \`!\`, \`&&\`, and \`||\` operators
* The condition in a conditional expression (\`cond ? x : y\`)
* Conditions for \`if\`, \`for\`, \`while\`, and \`do-while\` statements.`,
optionsDescription: Lint.Utils.dedent`
These options may be provided:
* '${OPTION_ALLOW_NULL_UNION} allows union types containing 'null'.
- It does *not* allow 'null' itself.
* '${OPTION_ALLOW_UNDEFINED_UNION} allows union types containing 'undefined'.
- It does *not* allow 'undefined' itself.
* '${OPTION_ALLOW_STRING} allows strings.
- It does *not* allow unions containing 'string'.
* \`${OPTION_ALLOW_NULL_UNION}\` allows union types containing \`null\`.
- It does *not* allow \`null\` itself.
* \`${OPTION_ALLOW_UNDEFINED_UNION}\` allows union types containing \`undefined\`.
- It does *not* allow \`undefined\` itself.
* \`${OPTION_ALLOW_STRING}\` allows strings.
- It does *not* allow unions containing \`string\`.
- It does *not* allow string literal types.
* '${OPTION_ALLOW_NUMBER} allows numbers.
- It does *not* allow unions containing 'number'.
* \`${OPTION_ALLOW_NUMBER}\` allows numbers.
- It does *not* allow unions containing \`number\`.
- It does *not* allow enums or number literal types.
* '${OPTION_ALLOW_MIX} allow multiple of the above to appear together.
- For example, 'string | number' or 'RegExp | null | undefined' would normally not be allowed.
- A type like '"foo" | "bar" | undefined' is always allowed, because it has only one way to be false.`,
* \`${OPTION_ALLOW_MIX}\` allow multiple of the above to appear together.
- For example, \`string | number\` or \`RegExp | null | undefined\` would normally not be allowed.
- A type like \`"foo" | "bar" | undefined\` is always allowed, because it has only one way to be false.`,
options: {
type: "array",
items: {
Expand Down

0 comments on commit 8193753

Please sign in to comment.