Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b865654

Browse files
committedNov 5, 2023
docs: deprecate badges defined in READMEs
1 parent 94c7e8f commit b865654

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed
 

‎README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ There's also a `postprocess` option that's only available via a [config file](#c
177177
| Name | Description | Default |
178178
| :-- | :-- | :-- |
179179
| `--check` | Whether to check for and fail if there is a diff. Any diff will be displayed but no output will be written to files. Typically used during CI. | `false` |
180-
| `--config-emoji` | Custom emoji to use for a config. Format is `config-name,emoji`. Option can be repeated. | Default emojis are provided for [common configs](./lib/emojis.ts). To remove a default emoji and rely on a [badge](#badges) instead, provide the config name without an emoji. |
180+
| `--config-emoji` | Custom emoji to use for a config. Format is `config-name,emoji`. Option can be repeated. | Default emojis are provided for [common configs](./lib/emojis.ts). See [Badges](#badges) for an alternative to emojis. |
181181
| `--config-format` | The format to use for config names. See choices in below [table](#--config-format). | `name` |
182182
| `--ignore-config` | Config to ignore from being displayed. Often used for an `all` config. Option can be repeated. | |
183183
| `--ignore-deprecated-rules` | Whether to ignore deprecated rules from being checked, displayed, or updated. | `false` |
@@ -305,19 +305,17 @@ module.exports = config;
305305

306306
### Badges
307307

308-
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`.
308+
While emojis are the recommended representations of configs that a rule belongs to, you can alternatively use a text/image/icon badge for configs by supplying the following markdown for the emoji using the [`--config-emoji`](#configuration-options) option.
309309

310-
Here's a badge for a custom `fun` config that displays in blue:
310+
For example, here's the markdown for text badge representing a custom `fun` config that displays in blue (note that the markdown includes alt text followed by the image URL):
311311

312312
```md
313-
[badge-fun]: https://img.shields.io/badge/-fun-blue.svg
313+
![fun config badge](https://img.shields.io/badge/-fun-blue.svg)
314314
```
315315

316316
And how it looks:
317317

318-
![badge-fun][]
319-
320-
[badge-fun]: https://img.shields.io/badge/-fun-blue.svg
318+
![fun config badge](https://img.shields.io/badge/-fun-blue.svg)
321319

322320
## Compatibility
323321

‎lib/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export async function run(
192192
)
193193
.option(
194194
'--config-emoji <config-emoji>',
195-
'(optional) Custom emoji to use for a config. Format is `config-name,emoji`. Default emojis are provided for common configs. To remove a default emoji and rely on a badge instead, provide the config name without an emoji. Option can be repeated.',
195+
'(optional) Custom emoji to use for a config. Format is `config-name,emoji`. Default emojis are provided for common configs. To use a text/image/icon badge instead of an emoji, supply the corresponding markdown as the emoji. Option can be repeated.',
196196
collectCSVNested,
197197
[]
198198
)

‎lib/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export type GenerateOptions = {
152152
* List of configs and their associated emojis.
153153
* Array of `[configName, emoji]`.
154154
* Default emojis are provided for common configs.
155-
* To remove a default emoji and rely on a badge instead, provide the config name without an emoji.
155+
* To use a text/image/icon badge instead of an emoji, supply the corresponding markdown as the emoji.
156156
*/
157157
readonly configEmoji?: readonly (
158158
| [configName: string, emoji: string]

0 commit comments

Comments
 (0)
Please sign in to comment.