Skip to content

Commit 023e823

Browse files
authored
Merge pull request #184 from bmish/readme-tweaks-2
2 parents 24f8a09 + d66e83b commit 023e823

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Also performs some basic section consistency checks on rule docs:
1515

1616
Used by popular ESLint plugins like:
1717

18+
- [eslint-plugin-ava](https://github.com/avajs/eslint-plugin-ava#rules)
1819
- [eslint-plugin-ember](https://github.com/ember-cli/eslint-plugin-ember#-rules)
1920
- [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules)
2021
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn#rules)
@@ -34,7 +35,10 @@ Install it:
3435
npm i --save-dev eslint-doc-generator
3536
```
3637

37-
Add scripts to `package.json` (both a lint script to ensure everything is up-to-date in CI and an update script) (add any config options in the `update:eslint-docs` script):
38+
Add scripts to `package.json`:
39+
40+
- Both a lint script to ensure everything is up-to-date in CI and an update script for contributors to run locally
41+
- Add any [config options](#configuration-options) in the `update:eslint-docs` script only
3842

3943
```json
4044
{
@@ -143,7 +147,7 @@ The table will hide columns that don't apply to any rules, and the legend will i
143147

144148
## Badge
145149

146-
For any configs without emojis (see [`--config-emoji`](#configuration-options)), you'll need to define badges for them at the bottom of your `README.md`.
150+
While config emojis are recommended (see [`--config-emoji`](#configuration-options)), you can alternatively define badges for configs at the bottom of your `README.md`.
147151

148152
Here's a badge for a custom `fun` config that displays in blue:
149153

@@ -165,7 +169,7 @@ And how it looks:
165169
| `--config-emoji` | Custom emoji to use for a config. Format is `config-name,emoji`. Default emojis are provided for [common configs](./lib/emojis.ts). To remove a default emoji and rely on a [badge](#badge) instead, provide the config name without an emoji. Option can be repeated. |
166170
| `--ignore-config` | Config to ignore from being displayed. Often used for an `all` config. Option can be repeated. |
167171
| `--ignore-deprecated-rules` | Whether to ignore deprecated rules from being checked, displayed, or updated (default: `false`). |
168-
| `--rule-doc-notices` | Ordered, comma-separated list of notices to display in rule doc. Non-applicable notices will be hidden. Choices: `configs`, `deprecated`, `fixable`, `fixableAndHasSuggestions`, `hasSuggestions`, `requiresTypeChecking`, `type` (off by default). Default: `deprecated,configs,fixable,fixableAndHasSuggestions,hasSuggestions,requiresTypeChecking`. |
172+
| `--rule-doc-notices` | Ordered, comma-separated list of notices to display in rule doc. Non-applicable notices will be hidden. Choices: `configs`, `deprecated`, `fixable`, `fixableAndHasSuggestions`, `hasSuggestions`, `requiresTypeChecking`, `type` (off by default). A consolidated notice called `fixableAndHasSuggestions` automatically replaces `fixable` and `hasSuggestions` when applicable. Default: `deprecated,configs,fixable,fixableAndHasSuggestions,hasSuggestions,requiresTypeChecking`. |
169173
| `--rule-doc-section-exclude` | Disallowed section in each rule doc. Exit with failure if present. Option can be repeated. |
170174
| `--rule-doc-section-include` | Required section in each rule doc. Exit with failure if missing. Option can be repeated. |
171175
| `--rule-doc-section-options` | Whether to require an "Options" or "Config" rule doc section and mention of any named options for rules with options (default: `true`). |

lib/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function run() {
6262
)
6363
.option(
6464
'--rule-doc-notices <notices>',
65-
`(optional) Ordered, comma-separated list of notices to display in rule doc. Non-applicable notices will be hidden. (choices: "${Object.values(
65+
`(optional) Ordered, comma-separated list of notices to display in rule doc. Non-applicable notices will be hidden. A consolidated notice called \`fixableAndHasSuggestions\` automatically replaces \`fixable\` and \`hasSuggestions\` when applicable. (choices: "${Object.values(
6666
NOTICE_TYPE
6767
).join('", "')}")`,
6868
// List of default enabled notices.

0 commit comments

Comments
 (0)