Skip to content

Commit 9cb7419

Browse files
authored
Implement markdown heading increment linter ( #2015 ) (#2107)
* Implement markdown heading increment linter ( #2015 ) Markdown heading increment linter implemented through remark-lint rule - "remark-lint-heading-increment" * Downgrade "remark-lint-heading-increment" to 2.x ( #2015 ) Downgrade "remark-lint-heading-increment" to 2.x as that is compatible with the current version (7.x ) of "remark-lint" used in the repo The latest version of "remark-lint-heading-increment" uses "unified-lint-rule" version 3.x which is not compatible with the current version of "remark-lint" used in the repo resulting in missing line numbers in the warnings thrown "unified-lint-rule" is a unified plugin to make it easier to create linting rules. Each rule in remark-lint uses "unified-lint-rule". * Resolved existing heading level inconsistencies ( #2015 ) Resolved existing heading level inconsistencies in the template-lifecycle-dom-and-modifiers.md file.
1 parent 6c9711b commit 9cb7419

File tree

35 files changed

+46
-31
lines changed

35 files changed

+46
-31
lines changed

.remarkrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ exports.plugins = [
2626
],
2727
'remark-preset-lint-consistent',
2828
'remark-preset-lint-recommended',
29+
'remark-lint-heading-increment',
2930
['remark-lint-list-item-indent', 'space'],
3031
['remark-lint-list-item-bullet-indent', false],
3132
['remark-lint-code-block-style', false],

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ The guides are spellchecked and linted for markdown consistency. You can test yo
150150
Markdown issues that will generate errors include:
151151
- Lists and text must be left justified, otherwise the linter will generate indentation errors
152152
- Missing URL reference definitions
153+
- Heading levels should increment by exactly one level at a time (e.g., h1 → h2 → h3) and should not skip levels (e.g., h1 → h3 is not allowed)
153154

154155
Most other markdown errors should be self explanatory.
155156

guides/release/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v3.28.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.0.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.1.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.10.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.11.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.12.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.2.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.3.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.4.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.5.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.6.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.7.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.8.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v4.9.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v5.0.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export default class SidebarComponent extends Component {
517517
}
518518
```
519519

520-
#### Modifiers and `...attributes`
520+
### Modifiers and `...attributes`
521521

522522
Modifiers can also be applied to components, and when they are, they are also
523523
passed forward and applied to an element with `...attributes`:

guides/v5.1.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.10.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.11.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.12.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.2.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.3.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.4.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.5.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.6.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.7.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.8.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v5.9.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v6.0.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v6.1.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

guides/v6.2.0/components/template-lifecycle-dom-and-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export default class SidebarComponent extends Component {
523523
}
524524
```
525525

526-
#### Modifiers and `...attributes`
526+
### Modifiers and `...attributes`
527527

528528
Modifiers can also be applied to components, and when they are, they are also
529529
passed forward and applied to an element with `...attributes`:

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
"qunit-dom": "^3.3.0",
106106
"remark-cli": "^8.0.0",
107107
"remark-lint": "^7.0.0",
108+
"remark-lint-heading-increment": "^2.0.0",
108109
"remark-preset-lint-consistent": "^3.0.0",
109110
"remark-preset-lint-recommended": "^4.0.0",
110111
"remark-retext": "^4.0.0",

pnpm-lock.yaml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)