Skip to content

Commit

Permalink
Add reset docs to rule generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 12, 2015
1 parent 90a5f8a commit 77b8bfd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
17 changes: 10 additions & 7 deletions doc/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fix their warnings.

* [Rules](#rules)

* [reset](#reset)
* [blockquote-indentation](#blockquote-indentation)
* [code-block-style](#code-block-style)
* [definition-case](#definition-case)
Expand Down Expand Up @@ -55,7 +56,6 @@ fix their warnings.
* [no-tabs](#no-tabs)
* [ordered-list-marker-style](#ordered-list-marker-style)
* [ordered-list-marker-value](#ordered-list-marker-value)
* [reset](#reset)
* [rule-style](#rule-style)
* [strong-marker](#strong-marker)
* [table-cell-padding](#table-cell-padding)
Expand All @@ -69,6 +69,15 @@ Remember that rules can always be turned off by
passing false. In addition, when reset is given, values can
be null or undefined in order to be ignored.

### reset

By default, all rules are turned on unless explicitly
set to `false`. When `reset: true`, the opposite is true:
all rules are turned off, unless when given a non-nully and
non-false value.

Options: `boolean`, default: `false`.

### blockquote-indentation

```md
Expand Down Expand Up @@ -1021,12 +1030,6 @@ be null or undefined in order to be ignored.
be the same as the relative starting point. When set to `'one'`, bullets
should always be `1`.

### reset

By default, all rules are turned on unless explicitly set to `false`.
When `reset: true`, the opposite is true: all rules are turned off,
unless when given a non-nully and non-false value.

### rule-style

```md
Expand Down
28 changes: 28 additions & 0 deletions script/build-rule-documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,34 @@ children.push({
}]
});

/*
* Add `reset` docs.
*/

children.push({
'type': 'heading',
'depth': 3,
'children': [{
'type': 'text',
'value': 'reset'
}]
}, {
'type': 'paragraph',
'children': [{
'type': 'text',
'value': 'By default, all rules are turned on unless explicitly\n' +
'set to `false`. When `reset: true`, the opposite is true:\n' +
'all rules are turned off, unless when given a non-nully and\n' +
'non-false value.'
}]
}, {
'type': 'paragraph',
'children': [{
'type': 'text',
'value': 'Options: `boolean`, default: `false`.'
}]
});

/*
* Add rules.
*/
Expand Down

0 comments on commit 77b8bfd

Please sign in to comment.