You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-1
Original file line number
Diff line number
Diff line change
@@ -182,7 +182,7 @@ There's also a `postprocess` option that's only available via a [config file](#c
182
182
|`--ignore-config`| Config to ignore from being displayed. Often used for an `all` config. Option can be repeated. ||
183
183
|`--ignore-deprecated-rules`| Whether to ignore deprecated rules from being checked, displayed, or updated. |`false`|
184
184
|`--init-rule-docs`| Whether to create rule doc files if they don't yet exist. |`false`|
185
-
|`--path-rule-doc`| Path to markdown file for each rule doc. Use `{name}` placeholder for the rule name. |`docs/rules/{name}.md`|
185
+
|`--path-rule-doc`| Path to markdown file for each rule doc. Use `{name}` placeholder for the rule name. A function can also be provided for this option via a [config file](#configuration-file). |`docs/rules/{name}.md`|
186
186
|`--path-rule-list`| Path to markdown file where the rules table list should live. Option can be repeated. |`README.md`|
187
187
|`--rule-doc-notices`| Ordered, comma-separated list of notices to display in rule doc. Non-applicable notices will be hidden. See choices in below [table](#column-and-notice-types). |`deprecated`, `configs`, `fixableAndHasSuggestions`, `requiresTypeChecking`|
188
188
|`--rule-doc-section-exclude`| Disallowed section in each rule doc. Exit with failure if present. Option can be repeated. |
@@ -261,6 +261,21 @@ const config = {
261
261
module.exports= config;
262
262
```
263
263
264
+
Example `.eslint-doc-generatorrc.js` with `pathRuleDoc` function:
/* JSON Schema can't validate functions so check this later */
@@ -226,7 +233,7 @@ export async function run(
226
233
)
227
234
.option(
228
235
'--path-rule-doc <path>',
229
-
`(optional) Path to markdown file for each rule doc. Use \`{name}\` placeholder for the rule name. (default: ${
236
+
`(optional) Path to markdown file for each rule doc. Use \`{name}\` placeholder for the rule name. To specify a function, use a JavaScript-based config file. (default: ${
0 commit comments