-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(deps): bump remark-lint-heading-increment from 3.1.2 to 4.0.0 #223
Merged
ybiquitous
merged 1 commit into
main
from
dependabot/npm_and_yarn/remark-lint-heading-increment-4.0.0
May 1, 2024
Merged
feat(deps): bump remark-lint-heading-increment from 3.1.2 to 4.0.0 #223
ybiquitous
merged 1 commit into
main
from
dependabot/npm_and_yarn/remark-lint-heading-increment-4.0.0
May 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps [remark-lint-heading-increment](https://github.com/remarkjs/remark-lint) from 3.1.2 to 4.0.0. - [Release notes](https://github.com/remarkjs/remark-lint/releases) - [Changelog](https://github.com/remarkjs/remark-lint/blob/4.0.0/history.md) - [Commits](https://github.com/remarkjs/remark-lint/commits/4.0.0) --- updated-dependencies: - dependency-name: remark-lint-heading-increment dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
bot
added
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
labels
May 1, 2024
Diff between remark-lint-heading-increment 3.1.2 and 4.0.0diff --git a/index.js b/index.js
index v3.1.2..v4.0.0 100644
--- a/index.js
+++ b/index.js
@@ -1,62 +1,134 @@
/**
+ * remark-lint rule to warn when heading ranks increment with more than
+ * 1 at a time.
+ *
+ * ## What is this?
+ *
+ * This package checks the increase of headings.
+ *
* ## When should I use this?
*
- * You can use this package to check that heading ranks increment with one
- * at a time.
+ * You can use this package to check the increase of headings.
*
* ## API
*
+ * ### `unified().use(remarkLintHeadingIncrement)`
+ *
+ * Warn when heading ranks increment with more than 1 at a time.
+ *
+ * ###### Parameters
+ *
* There are no options.
*
+ * ###### Returns
+ *
+ * Transform ([`Transformer` from `unified`][github-unified-transformer]).
+ *
* ## Recommendation
*
- * While markdown is not only used for HTML, HTML accessibility guidelines
- * state that headings should increment by one at a time.
- * As in, say the previous heading had a rank of 2 (so `<h2>`), then the
- * following heading that is to be considered “inside” it should have a rank of
- * 3 (`<h3>`).
- * Due to this, it’s recommended that when HTML output is a goal of the
- * document, that this rule is turned on.
+ * While markdown is not only used for HTML,
+ * HTML accessibility guidelines state that headings should increment by one at
+ * a time.
+ * As in,
+ * say the previous heading had a rank of 2 (so `<h2>`),
+ * then the following heading that is to be considered “inside” it should have
+ * a rank of 3 (`<h3>`).
+ * Due to this,
+ * when HTML output is a goal of the document,
+ * it’s recommended that this rule is turned on.
*
+ * [api-remark-lint-heading-increment]: #unifieduseremarklintheadingincrement
+ * [github-unified-transformer]: https://github.com/unifiedjs/unified#transformer
+ *
* @module heading-increment
- * @summary
- * remark-lint rule to warn when heading ranks increment with more than
- * 1 at a time.
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
+ *
* @example
* {"name": "ok.md"}
*
- * # Alpha
+ * # Mercury
*
- * ## Bravo
+ * ## Nomenclature
*
* @example
- * {"name": "not-ok.md", "label": "input"}
+ * {"name": "also-ok.md"}
*
- * # Charlie
+ * #### Impact basins and craters
*
- * ### Delta
+ * #### Plains
*
+ * #### Compressional features
+ *
* @example
- * {"name": "not-ok.md", "label": "output"}
+ * {"label": "input", "name": "not-ok.md"}
*
- * 3:1-3:10: Heading levels should increment by one level at a time
+ * # Mercury
+ *
+ * ### Internal structure
+ *
+ * ### Surface geology
+ *
+ * ## Observation history
+ *
+ * #### Mariner 10
+ *
+ * @example
+ * {"label": "output", "name": "not-ok.md"}
+ *
+ * 3:1-3:23: Unexpected heading rank `3`, exected rank `2`
+ * 5:1-5:20: Unexpected heading rank `3`, exected rank `2`
+ * 9:1-9:16: Unexpected heading rank `4`, exected rank `3`
+ *
+ * @example
+ * {"label": "input", "name": "html.md"}
+ *
+ * # Mercury
+ *
+ * <b>Mercury</b> is the first planet from the Sun and the smallest
+ * in the Solar System.
+ *
+ * <h3>Internal structure</h3>
+ *
+ * <h2>Orbit, rotation, and longitude</h2>
+ * @example
+ * {"label": "output", "name": "html.md"}
+ *
+ * 6:1-6:28: Unexpected heading rank `3`, exected rank `2`
+ *
+ * @example
+ * {"mdx": true, "name": "mdx.mdx"}
+ *
+ * # Mercury
+ *
+ * <b>Mercury</b> is the first planet from the Sun and the smallest
+ * in the Solar System.
+ *
+ * <h3>Internal structure</h3>
+ *
+ * <h2>Orbit, rotation, and longitude</h2>
+ * @example
+ * {"label": "output", "mdx": true, "name": "mdx.mdx"}
+ *
+ * 6:1-6:28: Unexpected heading rank `3`, exected rank `2`
*/
/**
* @typedef {import('mdast').Heading} Heading
+ * @typedef {import('mdast').Nodes} Nodes
* @typedef {import('mdast').Root} Root
*/
-/**
- * @typedef {Heading['depth']} Depth
- */
+/// <reference types="mdast-util-mdx" />
+import {ok as assert} from 'devlop'
import {lintRule} from 'unified-lint-rule'
-import {visit} from 'unist-util-visit'
-import {generated} from 'unist-util-generated'
+import {visitParents} from 'unist-util-visit-parents'
+import {VFileMessage} from 'vfile-message'
+const htmlRe = /<h([1-6])/
+const jsxNameRe = /^h([1-6])$/
+
const remarkLintHeadingIncrement = lintRule(
{
@@ -64,19 +136,59 @@
url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-heading-increment#readme'
},
- /** @type {import('unified-lint-rule').Rule<Root, void>} */
- (tree, file) => {
- /** @type {Depth} */
- let previous
+ /**
+ * @param {Root} tree
+ * Tree.
+ * @returns {undefined}
+ * Nothing.
+ */
+ function (tree, file) {
+ /** @type {Array<Array<Nodes> | undefined>} */
+ const stack = []
- visit(tree, 'heading', (node) => {
- if (!generated(node)) {
- if (previous && node.depth > previous + 1) {
- file.message(
- 'Heading levels should increment by one level at a time',
- node
- )
+ visitParents(tree, function (node, parents) {
+ const rank = inferRank(node)
+
+ if (rank) {
+ let index = rank
+ /** @type {Array<Nodes> | undefined} */
+ let closestAncestors
+
+ while (index--) {
+ if (stack[index]) {
+ closestAncestors = stack[index]
+ break
+ }
}
- previous = node.depth
+ if (closestAncestors) {
+ const parent = closestAncestors.at(-1)
+ assert(parent) // Always defined.
+ const parentRank = inferRank(parent)
+ assert(parentRank) // Always defined.
+
+ if (node.position && rank > parentRank + 1) {
+ file.message(
+ 'Unexpected heading rank `' +
+ rank +
+ '`, exected rank `' +
+ (parentRank + 1) +
+ '`',
+ {
+ ancestors: [...parents, node],
+ cause: new VFileMessage('Parent heading defined here', {
+ ancestors: closestAncestors,
+ place: parent.position,
+ source: 'remark-lint',
+ ruleId: 'heading-increment'
+ }),
+ place: node.position
+ }
+ )
+ }
+ }
+
+ stack[rank] = [...parents, node]
+ // Drop things after it.
+ stack.length = rank + 1
}
})
@@ -85,2 +197,34 @@
export default remarkLintHeadingIncrement
+
+/**
+ * Get rank of a node.
+ *
+ * @param {Nodes} node
+ * Node.
+ * @returns {Heading['depth'] | undefined}
+ * Rank, if heading.
+ */
+function inferRank(node) {
+ /** @type {Heading['depth'] | undefined} */
+ let rank
+
+ if (node.type === 'heading') {
+ rank = node.depth
+ } else if (node.type === 'html') {
+ const results = node.value.match(htmlRe)
+ rank = results
+ ? /** @type {Heading['depth']} */ (Number(results[1]))
+ : undefined
+ } else if (
+ (node.type === 'mdxJsxFlowElement' || node.type === 'mdxJsxTextElement') &&
+ node.name
+ ) {
+ const results = node.name.match(jsxNameRe)
+ rank = results
+ ? /** @type {Heading['depth']} */ (Number(results[1]))
+ : undefined
+ }
+
+ return rank
+}
diff --git a/package.json b/package.json
index v3.1.2..v4.0.0 100644
--- a/package.json
+++ b/package.json
@@ -1,21 +1,18 @@
{
"name": "remark-lint-heading-increment",
- "version": "3.1.2",
+ "version": "4.0.0",
"description": "remark-lint rule to warn when headings increment with more than 1 level at a time",
"license": "MIT",
"keywords": [
+ "heading",
+ "increase",
+ "increment",
+ "lint",
"remark",
- "lint",
- "rule",
+ "remark-lint",
"remark-lint-rule",
- "heading",
- "increment",
- "increase"
+ "rule"
],
- "repository": {
- "type": "git",
- "url": "https://github.com/remarkjs/remark-lint",
- "directory": "packages/remark-lint-heading-increment"
- },
+ "repository": "https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-heading-increment",
"bugs": "https://github.com/remarkjs/remark-lint/issues",
"funding": {
@@ -25,28 +22,34 @@
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
- "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
+ "Titus Wormer <tituswormer@gmail.com>"
],
"sideEffects": false,
"type": "module",
- "main": "index.js",
- "types": "index.d.ts",
+ "exports": "./index.js",
"files": [
"index.d.ts",
+ "index.d.ts.map",
"index.js"
],
"dependencies": {
- "@types/mdast": "^3.0.0",
- "unified": "^10.0.0",
- "unified-lint-rule": "^2.0.0",
- "unist-util-generated": "^2.0.0",
- "unist-util-visit": "^4.0.0"
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-mdx": "^3.0.0",
+ "unified-lint-rule": "^3.0.0",
+ "unist-util-visit-parents": "^6.0.0",
+ "vfile-message": "^4.0.0"
},
"scripts": {},
- "xo": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
- "strict": true,
- "ignoreCatch": true
+ "ignoreCatch": true,
+ "strict": true
+ },
+ "xo": {
+ "prettier": true,
+ "rules": {
+ "capitalized-comments": "off"
+ }
}
}
diff --git a/readme.md b/readme.md
index v3.1.2..v4.0.0 100644
--- a/readme.md
+++ b/readme.md
@@ -3,46 +3,43 @@
# remark-lint-heading-increment
-[![Build][build-badge]][build]
-[![Coverage][coverage-badge]][coverage]
-[![Downloads][downloads-badge]][downloads]
-[![Size][size-badge]][size]
-[![Sponsors][sponsors-badge]][collective]
-[![Backers][backers-badge]][collective]
-[![Chat][chat-badge]][chat]
+[![Build][badge-build-image]][badge-build-url]
+[![Coverage][badge-coverage-image]][badge-coverage-url]
+[![Downloads][badge-downloads-image]][badge-downloads-url]
+[![Size][badge-size-image]][badge-size-url]
+[![Sponsors][badge-funding-sponsors-image]][badge-funding-url]
+[![Backers][badge-funding-backers-image]][badge-funding-url]
+[![Chat][badge-chat-image]][badge-chat-url]
-[`remark-lint`][mono] rule to warn when heading ranks increment with more than
+[`remark-lint`][github-remark-lint] rule to warn when heading ranks increment with more than
1 at a time.
## Contents
-* [What is this?](#what-is-this)
-* [When should I use this?](#when-should-i-use-this)
-* [Presets](#presets)
-* [Install](#install)
-* [Use](#use)
-* [API](#api)
- * [`unified().use(remarkLintHeadingIncrement[, config])`](#unifieduseremarklintheadingincrement-config)
-* [Recommendation](#recommendation)
-* [Examples](#examples)
-* [Compatibility](#compatibility)
-* [Contribute](#contribute)
-* [License](#license)
+* [What is this?](#what-is-this)
+* [When should I use this?](#when-should-i-use-this)
+* [Presets](#presets)
+* [Install](#install)
+* [Use](#use)
+* [API](#api)
+ * [`unified().use(remarkLintHeadingIncrement)`](#unifieduseremarklintheadingincrement)
+* [Recommendation](#recommendation)
+* [Examples](#examples)
+* [Compatibility](#compatibility)
+* [Contribute](#contribute)
+* [License](#license)
## What is this?
-This package is a [unified][] ([remark][]) plugin, specifically a `remark-lint`
-rule.
-Lint rules check markdown code style.
+This package checks the increase of headings.
## When should I use this?
-You can use this package to check that heading ranks increment with one
-at a time.
+You can use this package to check the increase of headings.
## Presets
-This rule is included in the following presets:
+This plugin is included in the following presets:
-| Preset | Setting |
+| Preset | Options |
| - | - |
| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide) | |
@@ -50,6 +47,7 @@
## Install
-This package is [ESM only][esm].
-In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
+This package is [ESM only][github-gist-esm].
+In Node.js (version 16+),
+install with [npm][npm-install]:
```sh
@@ -57,15 +55,15 @@
```
-In Deno with [`esm.sh`][esmsh]:
+In Deno with [`esm.sh`][esm-sh]:
```js
-import remarkLintHeadingIncrement from 'https://esm.sh/remark-lint-heading-increment@3'
+import remarkLintHeadingIncrement from 'https://esm.sh/remark-lint-heading-increment@4'
```
-In browsers with [`esm.sh`][esmsh]:
+In browsers with [`esm.sh`][esm-sh]:
```html
<script type="module">
- import remarkLintHeadingIncrement from 'https://esm.sh/remark-lint-heading-increment@3?bundle'
+ import remarkLintHeadingIncrement from 'https://esm.sh/remark-lint-heading-increment@4?bundle'
</script>
```
@@ -76,20 +74,22 @@
```js
+import remarkLint from 'remark-lint'
+import remarkLintHeadingIncrement from 'remark-lint-heading-increment'
+import remarkParse from 'remark-parse'
+import remarkStringify from 'remark-stringify'
import {read} from 'to-vfile'
+import {unified} from 'unified'
import {reporter} from 'vfile-reporter'
-import {remark} from 'remark'
-import remarkLint from 'remark-lint'
-import remarkLintHeadingIncrement from 'remark-lint-heading-increment'
-main()
+const file = await read('example.md')
-async function main() {
- const file = await remark()
- .use(remarkLint)
- .use(remarkLintHeadingIncrement)
- .process(await read('example.md'))
+await unified()
+ .use(remarkParse)
+ .use(remarkLint)
+ .use(remarkLintHeadingIncrement)
+ .use(remarkStringify)
+ .process(file)
- console.error(reporter(file))
-}
+console.error(reporter(file))
```
@@ -97,5 +97,5 @@
```sh
-remark --use remark-lint --use remark-lint-heading-increment example.md
+remark --frail --use remark-lint --use remark-lint-heading-increment .
```
@@ -118,22 +118,32 @@
This package exports no identifiers.
-The default export is `remarkLintHeadingIncrement`.
+It exports no additional [TypeScript][typescript] types.
+The default export is
+[`remarkLintHeadingIncrement`][api-remark-lint-heading-increment].
-### `unified().use(remarkLintHeadingIncrement[, config])`
+### `unified().use(remarkLintHeadingIncrement)`
-This rule supports standard configuration that all remark lint rules accept
-(such as `false` to turn it off or `[1, options]` to configure it).
+Warn when heading ranks increment with more than 1 at a time.
+###### Parameters
+
There are no options.
+###### Returns
+
+Transform ([`Transformer` from `unified`][github-unified-transformer]).
+
## Recommendation
-While markdown is not only used for HTML, HTML accessibility guidelines
-state that headings should increment by one at a time.
-As in, say the previous heading had a rank of 2 (so `<h2>`), then the
-following heading that is to be considered “inside” it should have a rank of
-3 (`<h3>`).
-Due to this, it’s recommended that when HTML output is a goal of the
-document, that this rule is turned on.
+While markdown is not only used for HTML,
+HTML accessibility guidelines state that headings should increment by one at
+a time.
+As in,
+say the previous heading had a rank of 2 (so `<h2>`),
+then the following heading that is to be considered “inside” it should have
+a rank of 3 (`<h3>`).
+Due to this,
+when HTML output is a goal of the document,
+it’s recommended that this rule is turned on.
## Examples
@@ -144,7 +154,7 @@
```markdown
-# Alpha
+# Mercury
-## Bravo
+## Nomenclature
```
@@ -153,4 +163,20 @@
No messages.
+##### `also-ok.md`
+
+###### In
+
+```markdown
+#### Impact basins and craters
+
+#### Plains
+
+#### Compressional features
+```
+
+###### Out
+
+No messages.
+
##### `not-ok.md`
@@ -158,7 +184,13 @@
```markdown
-# Charlie
+# Mercury
-### Delta
+### Internal structure
+
+### Surface geology
+
+## Observation history
+
+#### Mariner 10
```
@@ -166,21 +198,72 @@
```text
-3:1-3:10: Heading levels should increment by one level at a time
+3:1-3:23: Unexpected heading rank `3`, exected rank `2`
+5:1-5:20: Unexpected heading rank `3`, exected rank `2`
+9:1-9:16: Unexpected heading rank `4`, exected rank `3`
```
+##### `html.md`
+
+###### In
+
+```markdown
+# Mercury
+
+<b>Mercury</b> is the first planet from the Sun and the smallest
+in the Solar System.
+
+<h3>Internal structure</h3>
+
+<h2>Orbit, rotation, and longitude</h2>
+```
+
+###### Out
+
+```text
+6:1-6:28: Unexpected heading rank `3`, exected rank `2`
+```
+
+##### `mdx.mdx`
+
+###### In
+
+> 👉 **Note**: this example uses
+> MDX ([`remark-mdx`][github-remark-mdx]).
+
+```mdx
+# Mercury
+
+<b>Mercury</b> is the first planet from the Sun and the smallest
+in the Solar System.
+
+<h3>Internal structure</h3>
+
+<h2>Orbit, rotation, and longitude</h2>
+```
+
+###### Out
+
+```text
+6:1-6:28: Unexpected heading rank `3`, exected rank `2`
+```
+
## Compatibility
-Projects maintained by the unified collective are compatible with all maintained
+Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
-As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
-Our projects sometimes work with older versions, but this is not guaranteed.
+When we cut a new major release, we drop support for unmaintained versions of
+Node.
+This means we try to keep the current release line,
+`remark-lint-heading-increment@4`,
+compatible with Node.js 16.
+
## Contribute
-See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
+See [`contributing.md`][github-dotfiles-contributing] in [`remarkjs/.github`][github-dotfiles-health] for ways
to get started.
-See [`support.md`][support] for ways to get help.
+See [`support.md`][github-dotfiles-support] for ways to get help.
-This project has a [code of conduct][coc].
+This project has a [code of conduct][github-dotfiles-coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
@@ -188,53 +271,57 @@
## License
-[MIT][license] © [Titus Wormer][author]
+[MIT][file-license] © [Titus Wormer][author]
-[build-badge]: https://github.com/remarkjs/remark-lint/workflows/main/badge.svg
+[api-remark-lint-heading-increment]: #unifieduseremarklintheadingincrement
-[build]: https://github.com/remarkjs/remark-lint/actions
+[author]: https://wooorm.com
-[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-lint.svg
+[badge-build-image]: https://github.com/remarkjs/remark-lint/workflows/main/badge.svg
-[coverage]: https://codecov.io/github/remarkjs/remark-lint
+[badge-build-url]: https://github.com/remarkjs/remark-lint/actions
-[downloads-badge]: https://img.shields.io/npm/dm/remark-lint-heading-increment.svg
+[badge-chat-image]: https://img.shields.io/badge/chat-discussions-success.svg
-[downloads]: https://www.npmjs.com/package/remark-lint-heading-increment
+[badge-chat-url]: https://github.com/remarkjs/remark/discussions
-[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-lint-heading-increment.svg
+[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark-lint.svg
-[size]: https://bundlephobia.com/result?p=remark-lint-heading-increment
+[badge-coverage-url]: https://codecov.io/github/remarkjs/remark-lint
-[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
+[badge-downloads-image]: https://img.shields.io/npm/dm/remark-lint-heading-increment.svg
-[backers-badge]: https://opencollective.com/unified/backers/badge.svg
+[badge-downloads-url]: https://www.npmjs.com/package/remark-lint-heading-increment
-[collective]: https://opencollective.com/unified
+[badge-funding-backers-image]: https://opencollective.com/unified/backers/badge.svg
-[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
+[badge-funding-sponsors-image]: https://opencollective.com/unified/sponsors/badge.svg
-[chat]: https://github.com/remarkjs/remark/discussions
+[badge-funding-url]: https://opencollective.com/unified
-[unified]: https://github.com/unifiedjs/unified
+[badge-size-image]: https://img.shields.io/bundlejs/size/remark-lint-heading-increment
-[remark]: https://github.com/remarkjs/remark
+[badge-size-url]: https://bundlejs.com/?q=remark-lint-heading-increment
-[mono]: https://github.com/remarkjs/remark-lint
+[esm-sh]: https://esm.sh
-[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+[file-license]: https://github.com/remarkjs/remark-lint/blob/main/license
-[esmsh]: https://esm.sh
+[github-dotfiles-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md
-[npm]: https://docs.npmjs.com/cli/install
+[github-dotfiles-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md
-[health]: https://github.com/remarkjs/.github
+[github-dotfiles-health]: https://github.com/remarkjs/.github
-[contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md
+[github-dotfiles-support]: https://github.com/remarkjs/.github/blob/main/support.md
-[support]: https://github.com/remarkjs/.github/blob/main/support.md
+[github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
-[coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md
+[github-remark-lint]: https://github.com/remarkjs/remark-lint
-[license]: https://github.com/remarkjs/remark-lint/blob/main/license
+[github-remark-mdx]: https://mdxjs.com/packages/remark-mdx/
-[author]: https://wooorm.com
+[github-unified-transformer]: https://github.com/unifiedjs/unified#transformer
+
+[npm-install]: https://docs.npmjs.com/cli/install
+
+[typescript]: https://www.typescriptlang.org
diff --git a/index.d.ts b/index.d.ts
index v3.1.2..v4.0.0 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -1,9 +1,9 @@
-export default remarkLintHeadingIncrement
-export type Heading = import('mdast').Heading
-export type Root = import('mdast').Root
-export type Depth = Heading['depth']
-declare const remarkLintHeadingIncrement: import('unified').Plugin<
- void[] | [unknown],
- import('mdast').Root,
- import('mdast').Root
->
+export default remarkLintHeadingIncrement;
+export type Heading = import('mdast').Heading;
+export type Nodes = import('mdast').Nodes;
+export type Root = import('mdast').Root;
+declare const remarkLintHeadingIncrement: {
+ (config?: unknown): ((tree: import("mdast").Root, file: import("vfile").VFile, next: import("unified").TransformCallback<import("mdast").Root>) => undefined) | undefined;
+ readonly name: string;
+};
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/index.d.ts.map b/index.d.ts.map
new file mode 100644
index v3.1.2..v4.0.0
--- a/index.d.ts.map
+++ b/index.d.ts.map
@@ -0,0 +1,1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";sBAqHa,OAAO,OAAO,EAAE,OAAO;oBACvB,OAAO,OAAO,EAAE,KAAK;mBACrB,OAAO,OAAO,EAAE,IAAI;AAajC;;;EA+DC"}
\ No newline at end of file
Command detailsnpm diff --diff=remark-lint-heading-increment@3.1.2 --diff=remark-lint-heading-increment@4.0.0 --diff-unified=2 See also the Reported by ybiquitous/npm-diff-action@v1.6.0 (Node.js 22.0.0 and npm 10.7.0) |
ybiquitous
changed the title
build(deps): bump remark-lint-heading-increment from 3.1.2 to 4.0.0
feat(deps): bump remark-lint-heading-increment from 3.1.2 to 4.0.0
May 1, 2024
ybiquitous
deleted the
dependabot/npm_and_yarn/remark-lint-heading-increment-4.0.0
branch
May 1, 2024 16:41
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rebasing might not happen immediately, so don't worry if this takes some time.
Note: if you make any changes to this PR yourself, they will take precedence over the rebase.
Bumps remark-lint-heading-increment from 3.1.2 to 4.0.0.
Release notes
Sourced from remark-lint-heading-increment's releases.
Changelog
Sourced from remark-lint-heading-increment's changelog.
... (truncated)
Commits
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)