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
@@ -68,7 +68,7 @@ Delete any old rules list from your `README.md`. A new one will be automatically
68
68
<!-- end auto-generated rules list -->
69
69
```
70
70
71
-
Delete any old recommended/fixable/etc. notices from your rule docs. A new title and notices will be automatically added to the top of each rule doc (along with a marker comment if it doesn't exist yet).
71
+
Delete any old recommended/fixable/etc. notices from your rule docs. A new title and notices will be automatically added to the top of each rule doc (along with a marker comment if it doesn't already exist).
72
72
73
73
```md
74
74
<!-- end auto-generated rule header -->
@@ -116,7 +116,9 @@ And how it looks:
116
116
117
117
These can be provided as CLI options or as [config file](#configuration-file) options. All options are optional.
118
118
119
-
There's also an optional path argument if you need to point the CLI to an ESLint plugin directory that isn't just the current directory.
119
+
The CLI has an optional path argument if you need to point the CLI to an ESLint plugin directory that isn't just the current directory.
120
+
121
+
There's also a `postprocess` option that's only available via a [config file](#configuration-file).
120
122
121
123
| Name | Description |
122
124
| :-- | :-- |
@@ -151,14 +153,14 @@ Where `no-foo` is the rule name, `Disallow use of foo` is the rule description,
151
153
152
154
### Configuration file
153
155
154
-
There are a few ways to create a config file:
156
+
There are a few ways to create a config file (as an alternative to passing the options via CLI):
155
157
156
158
- An object exported by `.eslint-doc-generatorrc.js`, `.eslint-doc-generatorrc.json`, or any other config file format/name supported by [cosmiconfig](https://github.com/davidtheclark/cosmiconfig#searchplaces)
157
159
- An object under the `eslint-doc-generator` key in `package.json`
158
160
159
161
Config files support all the [CLI options](#configuration-options) but in camelCase.
160
162
161
-
Using a JavaScript-based config file also allows you to provide a `postprocess` function to be called with the generated content and file path for each processed file. Useful for applying custom transformations such as formatting with tools like [`prettier`](#prettier).
163
+
Using a JavaScript-based config file also allows you to provide a `postprocess` function to be called with the generated content and file path for each processed file. This is useful for applying custom transformations such as formatting with tools like prettier (see [prettier example](#prettier)).
162
164
163
165
Example `.eslint-doc-generatorrc.js`:
164
166
@@ -175,7 +177,7 @@ module.exports = config;
175
177
176
178
### Build tools
177
179
178
-
If you have a build step for your code like [Babel](https://babeljs.io/) or [TypeScript](https://www.typescriptlang.org/), you may need to adjust your scripts to run your build before this tool:
180
+
If you have a build step for your code like [Babel](https://babeljs.io/) or [TypeScript](https://www.typescriptlang.org/), you may need to adjust your scripts to run your build before this tool to ensure the documentation is generated from the latest plugin information:
179
181
180
182
```json
181
183
{
@@ -194,7 +196,7 @@ const { prettier: prettierRC } = require('./package.json'); // or wherever your
0 commit comments