-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a user-defined function for --path-rule-doc
option
#502
Conversation
--path-rule-doc
option
test/lib/generate/file-paths-test.ts
Outdated
it('generates the documentation using a function for pathRuleDoc', async function () { | ||
await generate('.', { | ||
pathRuleDoc: (ruleName) => join('rules', ruleName, `${ruleName}.md`), | ||
pathRuleList: join('rules', 'list.md'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove pathRuleList
from this test as it's not relevant.
@@ -182,7 +182,7 @@ There's also a `postprocess` option that's only available via a [config file](#c | |||
| `--ignore-config` | Config to ignore from being displayed. Often used for an `all` config. Option can be repeated. | | | |||
| `--ignore-deprecated-rules` | Whether to ignore deprecated rules from being checked, displayed, or updated. | `false` | | |||
| `--init-rule-docs` | Whether to create rule doc files if they don't yet exist. | `false` | | |||
| `--path-rule-doc` | Path to markdown file for each rule doc. Use `{name}` placeholder for the rule name. | `docs/rules/{name}.md` | | |||
| `--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` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an example of the function to the "Configuration file" section in the readme, similar to how we have examples of the other option functions in that section?
`pathRuleDoc` and `urlRuleDoc` functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Great work on this.
Thank you very much for your suggestions too |
close #501
If I missed or messed up something, please let me know and I will correct it ASAP.