Skip to content

Commit

Permalink
Rename to TOP011
Browse files Browse the repository at this point in the history
Original propose TOP011 closed
  • Loading branch information
MaoShizhong committed Aug 25, 2024
1 parent fadf9a1 commit 54403c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@
"./markdownlint/TOP007_useMarkdownLinks/TOP007_useMarkdownLinks.js",
"./markdownlint/TOP008_useBackticksForFencedCodeBlocks/TOP008_useBackticksForFencedCodeBlocks.js",
"./markdownlint/TOP010_useLazyNumbering/TOP010_useLazyNumbering.js",
"./markdownlint/TOP012_noteBoxHeadingLevel/TOP012_noteBoxHeadingLevel.js"
"./markdownlint/TOP011_noteBoxHeadingLevel/TOP011_noteBoxHeadingLevel.js"
]
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module.exports = {
names: ["TOP012", "note-box-heading-level"],
names: ["TOP011", "note-box-heading-level"],
description: "Note box headings must be level 4 (####)",
information: new URL(
"https://github.com/TheOdinProject/curriculum/blob/main/markdownlint/docs/TOP012.md"
"https://github.com/TheOdinProject/curriculum/blob/main/markdownlint/docs/TOP011.md"
),
tags: ["headings"],
parser: "markdownit",
function: function TOP012(params, onError) {
function: function TOP011(params, onError) {
const noteBoxHeadings = params.parsers.markdownit.tokens.filter((token, index, tokens) => {
const previousToken = tokens[index - 1];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Introduction

This file should flag with TOP012 errors, and no other linting errors.
This file should flag with TOP011 errors, and no other linting errors.

### Lesson overview

Expand Down
6 changes: 3 additions & 3 deletions markdownlint/docs/TOP012.md → markdownlint/docs/TOP011.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `TOP012`: Note box heading level
# `TOP011` - Note box heading level

Tags: `headings`

Expand All @@ -9,7 +9,7 @@ This rule is triggered when a [note box](https://github.com/TheOdinProject/curri
```markdown
<div class="lesson-note" markdown="1">

### Non-level 4 note box heading: Will flag a TOP012 error as it should be level 4
### Non-level 4 note box heading: Will flag a TOP011 error as it should be level 4

Note box contents.

Expand All @@ -21,7 +21,7 @@ This can be resolved by changing the note box heading to a level 4 heading:
```markdown
<div class="lesson-note" markdown="1">

#### Level 4 note box heading: Correct and will not flag a TOP012 error
#### Level 4 note box heading: Correct and will not flag a TOP011 error

Note box contents.

Expand Down

0 comments on commit 54403c1

Please sign in to comment.