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
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,7 @@ There's also a `postprocess` option that's only available via a [config file](#c
146
146
|`--rule-list-columns`| Ordered, comma-separated list of columns to display in rule list. Empty columns will be hidden. See choices in below [table](#column-and-notice-types). Default: `name,description,configsError,configsWarn,configsOff,fixable,hasSuggestions,requiresTypeChecking,deprecated`. |
147
147
|`--rule-list-split`| Rule property(s) to split the rules list by. A separate list and header will be created for each value. Example: `meta.type`. A function can also be provided for this option via a [config file](#configuration-file). |
148
148
|`--url-configs`| Link to documentation about the ESLint configurations exported by the plugin. |
149
-
|`--url-rule-doc`| Link to documentation for each rule. Useful when it differs from the rule doc path on disk (e.g. custom documentation site in use). Use `{name}` placeholder for the rule name. |
149
+
|`--url-rule-doc`| Link to documentation for each rule. Useful when it differs from the rule doc path on disk (e.g. custom documentation site in use). Use `{name}` placeholder for the rule name. A function can also be provided for this option via a [config file](#configuration-file). |
150
150
151
151
### Column and notice types
152
152
@@ -241,6 +241,22 @@ const config = {
241
241
module.exports= config;
242
242
```
243
243
244
+
Example `.eslint-doc-generatorrc.js` with `urlRuleDoc` function:
While config emojis are the recommended representations of configs that a rule belongs to (see [`--config-emoji`](#configuration-options)), you can alternatively define badges for configs at the bottom of your `README.md`.
/* Functions are allowed but JSON Schema can't validate them so no-op in this case. */
125
+
}
126
+
: {type: 'string'},
120
127
};
121
128
constschema={
122
129
type: 'object',
@@ -290,7 +297,7 @@ export async function run(
290
297
)
291
298
.option(
292
299
'--url-rule-doc <url>',
293
-
'(optional) Link to documentation for each rule. Useful when it differs from the rule doc path on disk (e.g. custom documentation site in use). Use `{name}` placeholder for the rule name.'
300
+
'(optional) Link to documentation for each rule. Useful when it differs from the rule doc path on disk (e.g. custom documentation site in use). Use `{name}` placeholder for the rule name. To specify a function, use a JavaScript-based config file.'
0 commit comments