Skip to content

Commit

Permalink
Merge pull request #155 from bmish/marker-auto-generated
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Oct 21, 2022
2 parents 1297a5b + 6f4b370 commit 58f2269
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 176 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -45,8 +45,8 @@ Add scripts to `package.json` (both a lint script to ensure everything is up-to-
Delete any old rules list from your `README.md`. A new one will be automatically added to your `## Rules` section (along with the following marker comments if they don't already exist):

```md
<!-- begin rules list -->
<!-- end rules list -->
<!-- begin auto-generated rules list -->
<!-- end auto-generated rules list -->
```

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).
Expand Down Expand Up @@ -86,7 +86,7 @@ Generated content in a rule doc (everything above the marker comment) (intention

❌ This rule is deprecated. It was replaced by [prefer-bar](prefer-bar.md).

<!-- end rule header -->
<!-- end auto-generated rule header -->

Description.

Expand All @@ -104,7 +104,7 @@ Generated rules table in `README.md` (everything between the marker comments) (i

## Rules

<!-- begin rules list -->
<!-- begin auto-generated rules list -->

💼 Configurations enabled in.\
✅ Enabled in the `recommended` configuration.\
Expand All @@ -124,7 +124,7 @@ Generated rules table in `README.md` (everything between the marker comments) (i
| [prefer-bar](docs/rules/prefer-bar.md) | enforce using bar | ✅ 🎨 | | 💡 | 💭 | 📖 | |
| [require-baz](docs/rules/require-baz.md) | require using baz | | 🔧 | | | 📏 | ❌ |

<!-- end rules list -->
<!-- end auto-generated rules list -->

...
```
Expand Down
7 changes: 4 additions & 3 deletions lib/markers.ts
@@ -1,6 +1,7 @@
// Markers so that the README rules list can be automatically updated.
export const BEGIN_RULE_LIST_MARKER = '<!-- begin rules list -->';
export const END_RULE_LIST_MARKER = '<!-- end rules list -->';
export const BEGIN_RULE_LIST_MARKER =
'<!-- begin auto-generated rules list -->';
export const END_RULE_LIST_MARKER = '<!-- end auto-generated rules list -->';

// Marker so that rule doc header (title/notices) can be automatically updated.
export const END_RULE_HEADER_MARKER = '<!-- end rule header -->';
export const END_RULE_HEADER_MARKER = '<!-- end auto-generated rule header -->';

0 comments on commit 58f2269

Please sign in to comment.