Skip to content
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-file-extension from 2.1.2 to 3.0.0 #204

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 1, 2024

Bumps remark-lint-file-extension from 2.1.2 to 3.0.0.

Release notes

Sourced from remark-lint-file-extension's releases.

3.0.0

  • Remove support for Duo (e55fb3a)
  • Update for changes in remark@4.0.0 (7fde792)
  • Add example for running remark with lint plugin (34d19b4)

remark-preset-lint-consistent@3.0.0

remark-preset-lint-markdown-style-guide@3.0.0

remark-lint-checkbox-character-style@3.0.0

See remark-lint@8.0.0

remark-lint-checkbox-content-indent@3.0.0

See remark-lint@8.0.0

remark-lint-list-item-bullet-indent@3.0.0

See remark-lint@8.0.0

remark-lint-list-item-spacing@3.0.0

See remark-lint@8.0.0

remark-lint-no-consecutive-blank-lines@3.0.0

See remark-lint@8.0.0

remark-lint-no-heading-content-indent@3.0.0

See remark-lint@8.0.0

remark-lint-no-heading-indent@3.0.0

See remark-lint@8.0.0

remark-lint-no-inline-padding@3.0.0

See remark-lint@8.0.0

remark-lint-no-paragraph-content-indent@3.0.0

See remark-lint@8.0.0

remark-lint-no-table-indentation@3.0.0

See remark-lint@8.0.0

remark-lint-no-undefined-references@3.0.0

See remark-lint@8.0.0

remark-lint-table-cell-padding@3.0.0

See remark-lint@8.0.0

remark-lint-table-pipes@3.0.0

See remark-lint@8.0.0

... (truncated)

Changelog

Sourced from remark-lint-file-extension's changelog.

3.0.0 / 2016-02-14

  • Remove support for Duo (e55fb3a)
  • Update for changes in remark@4.0.0 (7fde792)
  • Add example for running remark with lint plugin (34d19b4)

2.3.1 / 2016-02-03

  • Fix Travis deploy to GitHub Releases (203367c)

2.3.0 / 2016-02-03

  • Update support for configuration comments (870cb99)
  • Fix literal URL and blank lines detection (b6309f0)
  • Add remark-lint-code to list of external rules (a81e82b)

2.2.1 / 2016-01-15

  • Fix list-item-indent for non-incremented lists (e708a1c)

2.2.0 / 2016-01-13

  • Add support for global externals when running globally (589b4d7)

2.1.0 / 2016-01-09

  • Update readme.md to reflect screenshot.png (b2c4637)
  • Rename screen-shot.png to screenshot.png (9c48497)
  • Update screen-shot.png (cf8ede7)
  • Add no-undefined-references rule (8f6e055)
  • Fix typo (2c628f2)
  • Add no-unused-definitions rule (bde77ab)
  • Update browserify (43042ea)
  • Rename sentence-newline external rule to remark (7ff9b74)

2.0.3 / 2016-01-06

  • Fix silent warnings for invalid options (aada8e8)
  • Add list of external rules to readme.md (298b33a)

2.0.2 / 2015-12-27

... (truncated)

Commits

Dependabot compatibility score

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)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels May 1, 2024
Copy link

github-actions bot commented May 1, 2024

Diff between remark-lint-file-extension 2.1.2 and 3.0.0
diff --git a/index.js b/index.js
index v2.1.2..v3.0.0 100644
--- a/index.js
+++ b/index.js
@@ -1,17 +1,50 @@
 /**
+ * remark-lint rule to warn for unexpected file extensions.
+ *
+ * ## What is this?
+ *
+ * This package checks the file extension.
+ *
  * ## When should I use this?
  *
- * You can use this package to check that file extensions are `md`.
+ * You can use this package to check that file extensions are consistent.
  *
  * ## API
  *
- * The following options (default: `'md'`) are accepted:
+ * ### `unified().use(remarkLintFileExtension[, options])`
  *
- * *   `string` (example `'markdown'`)
- *     — preferred file extension (no dot)
+ * Warn for unexpected extensions.
  *
- * > 👉 **Note**: does not warn when files have no file extensions (such as
- * > `AUTHORS` or `LICENSE`).
+ * ###### Parameters
  *
+ * * `options` ([`Extensions`][api-extensions] or [`Options`][api-options],
+ *   optional)
+ *   — configuration
+ *
+ * ###### Returns
+ *
+ * Transform ([`Transformer` from `unified`][github-unified-transformer]).
+ *
+ * ### `Extensions`
+ *
+ * File extension(s) (TypeScript type).
+ *
+ * ###### Type
+ *
+ * ```ts
+ * type Extensions = Array<string> | string
+ * ```
+ *
+ * ### `Options`
+ *
+ * Configuration (TypeScript type).
+ *
+ * ###### Fields
+ *
+ * * `allowExtensionless` (`boolean`, default: `true`)
+ *   — allow no file extension such as `AUTHORS` or `LICENSE`
+ * * `extensions` ([`Extensions`][api-extensions], default: `['mdx', 'md']`)
+ *   — allowed file extension(s)
+ *
  * ## Recommendation
  *
@@ -21,23 +54,43 @@
  * Do not use `md` for MDX: use `mdx` instead.
  *
+ * [api-extensions]: #extensions
+ * [api-options]: #options
+ * [api-remark-lint-file-extension]: #unifieduseremarklintfileextension-options
+ * [github-unified-transformer]: https://github.com/unifiedjs/unified#transformer
+ *
  * @module file-extension
- * @summary
- *   remark-lint rule to check the file extension.
  * @author Titus Wormer
  * @copyright 2015 Titus Wormer
  * @license MIT
+ *
  * @example
  *   {"name": "readme.md"}
  *
  * @example
+ *   {"name": "readme.mdx"}
+ *
+ * @example
  *   {"name": "readme"}
  *
  * @example
- *   {"name": "readme.mkd", "label": "output", "positionless": true}
+ *   {"config": {"allowExtensionless": false}, "label": "output", "name": "readme", "positionless": true}
  *
- *   1:1: Incorrect extension: use `md`
+ *   1:1: Unexpected missing file extension, expected `mdx` or `md`
  *
  * @example
- *   {"name": "readme.mkd", "config": "mkd"}
+ *   {"label": "output", "name": "readme.mkd", "positionless": true}
+ *
+ *   1:1: Unexpected file extension `mkd`, expected `mdx` or `md`
+ *
+ * @example
+ *   {"config": "mkd", "name": "readme.mkd"}
+ *
+ * @example
+ *   {"config": ["markdown", "md", "mdown", "mdwn", "mdx", "mkd", "mkdn", "mkdown", "ron"], "label": "input", "name": "readme.css", "positionless": true}
+ *
+ * @example
+ *   {"config": ["markdown", "md", "mdown", "mdwn", "mdx", "mkd", "mkdn", "mkdown", "ron"], "label": "output", "name": "readme.css"}
+ *
+ *   1:1: Unexpected file extension `css`, expected `markdown`, `md`, `mdown`, …
  */
 
@@ -47,10 +100,24 @@
 
 /**
- * @typedef {string} Options
- *   Options.
+ * @typedef {Array<string> | string} Extensions
+ *   File extension(s).
+ *
+ * @typedef Options
+ *   Configuration.
+ * @property {boolean | null | undefined} [allowExtensionless=true]
+ *   Allow no file extension such as `AUTHORS` or `LICENSE` (default: `true`).
+ * @property {Readonly<Extensions> | null | undefined} [extensions=['mdx', 'md']]
+ *   Allowed file extension(s) (default: `['mdx', 'md']`).
  */
 
+import {quotation} from 'quotation'
 import {lintRule} from 'unified-lint-rule'
 
+/** @type {ReadonlyArray<string>} */
+const defaultExtensions = ['mdx', 'md']
+
+const listFormat = new Intl.ListFormat('en', {type: 'disjunction'})
+const listFormatUnit = new Intl.ListFormat('en', {type: 'unit'})
+
 const remarkLintFileExtension = lintRule(
   {
@@ -58,11 +125,55 @@
     url: 'https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-file-extension#readme'
   },
-  /** @type {import('unified-lint-rule').Rule<Root, Options>} */
-  (_, file, option = 'md') => {
-    const ext = file.extname
+  /**
+   * @param {Root} _
+   *   Tree.
+   * @param {Readonly<Extensions> | Readonly<Options> | null | undefined} [options]
+   *   Configuration (optional).
+   * @returns {undefined}
+   *   Nothing.
+   */
+  function (_, file, options) {
+    let expected = defaultExtensions
+    let allowExtensionless = true
+    /** @type {Readonly<Extensions> | null | undefined} */
+    let extensionsValue
 
-    if (ext && ext.slice(1) !== option) {
-      file.message('Incorrect extension: use `' + option + '`')
+    if (Array.isArray(options)) {
+      // TS fails on `isArray` w/ readonly.
+      extensionsValue = /** @type {ReadonlyArray<string>} */ (options)
+    } else if (typeof options === 'string') {
+      extensionsValue = options
+    } else if (options) {
+      // TS fails on `isArray` w/ readonly.
+      const settings = /** @type {Options} */ (options)
+      extensionsValue = settings.extensions
+
+      if (settings.allowExtensionless === false) {
+        allowExtensionless = false
+      }
     }
+
+    if (Array.isArray(extensionsValue)) {
+      expected = /** @type {ReadonlyArray<string>} */ (extensionsValue)
+    } else if (typeof extensionsValue === 'string') {
+      expected = [extensionsValue]
+    }
+
+    const extname = file.extname
+    const actual = extname ? extname.slice(1) : undefined
+    const expectedDisplay =
+      expected.length > 3
+        ? listFormatUnit.format([...quotation(expected.slice(0, 3), '`'), '…'])
+        : listFormat.format(quotation(expected, '`'))
+
+    if (actual ? !expected.includes(actual) : !allowExtensionless) {
+      file.message(
+        (actual
+          ? 'Unexpected file extension `' + actual + '`'
+          : 'Unexpected missing file extension') +
+          ', expected ' +
+          expectedDisplay
+      )
+    }
   }
 )
diff --git a/package.json b/package.json
index v2.1.2..v3.0.0 100644
--- a/package.json
+++ b/package.json
@@ -1,21 +1,18 @@
 {
   "name": "remark-lint-file-extension",
-  "version": "2.1.2",
+  "version": "3.0.0",
   "description": "remark-lint rule to warn when the file’s extension violates the given style",
   "license": "MIT",
   "keywords": [
+    "extension",
+    "extname",
+    "file",
+    "lint",
     "remark",
-    "lint",
-    "rule",
+    "remark-lint",
     "remark-lint-rule",
-    "file",
-    "extension",
-    "extname"
+    "rule"
   ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/remarkjs/remark-lint",
-    "directory": "packages/remark-lint-file-extension"
-  },
+  "repository": "https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-file-extension",
   "bugs": "https://github.com/remarkjs/remark-lint/issues",
   "funding": {
@@ -25,26 +22,32 @@
   "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"
+    "@types/mdast": "^4.0.0",
+    "quotation": "^2.0.0",
+    "unified-lint-rule": "^3.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",
+      "unicorn/prefer-default-parameters": "off"
+    }
   }
 }
diff --git a/readme.md b/readme.md
index v2.1.2..v3.0.0 100644
--- a/readme.md
+++ b/readme.md
@@ -3,44 +3,44 @@
 # remark-lint-file-extension
 
-[![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 check the file extension.
+[`remark-lint`][github-remark-lint] rule to warn for unexpected file extensions.
 
 ## 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(remarkLintFileExtension[, config])`](#unifieduseremarklintfileextension-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(remarkLintFileExtension[, options])`](#unifieduseremarklintfileextension-options)
+  * [`Extensions`](#extensions)
+  * [`Options`](#options)
+* [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 file extension.
 
 ## When should I use this?
 
-You can use this package to check that file extensions are `md`.
+You can use this package to check that file extensions are consistent.
 
 ## 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) | `'md'` |
@@ -48,6 +48,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
@@ -55,15 +56,15 @@
 ```
 
-In Deno with [`esm.sh`][esmsh]:
+In Deno with [`esm.sh`][esm-sh]:
 
 ```js
-import remarkLintFileExtension from 'https://esm.sh/remark-lint-file-extension@2'
+import remarkLintFileExtension from 'https://esm.sh/remark-lint-file-extension@3'
 ```
 
-In browsers with [`esm.sh`][esmsh]:
+In browsers with [`esm.sh`][esm-sh]:
 
 ```html
 <script type="module">
-  import remarkLintFileExtension from 'https://esm.sh/remark-lint-file-extension@2?bundle'
+  import remarkLintFileExtension from 'https://esm.sh/remark-lint-file-extension@3?bundle'
 </script>
 ```
@@ -74,20 +75,22 @@
 
 ```js
+import remarkLint from 'remark-lint'
+import remarkLintFileExtension from 'remark-lint-file-extension'
+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 remarkLintFileExtension from 'remark-lint-file-extension'
 
-main()
+const file = await read('example.md')
 
-async function main() {
-  const file = await remark()
-    .use(remarkLint)
-    .use(remarkLintFileExtension)
-    .process(await read('example.md'))
+await unified()
+  .use(remarkParse)
+  .use(remarkLint)
+  .use(remarkLintFileExtension)
+  .use(remarkStringify)
+  .process(file)
 
-  console.error(reporter(file))
-}
+console.error(reporter(file))
 ```
 
@@ -95,5 +98,5 @@
 
 ```sh
-remark --use remark-lint --use remark-lint-file-extension example.md
+remark --frail --use remark-lint --use remark-lint-file-extension .
 ```
 
@@ -116,19 +119,45 @@
 
 This package exports no identifiers.
-The default export is `remarkLintFileExtension`.
+It exports the [TypeScript][typescript] types
+[`Extensions`][api-extensions] and
+[`Options`][api-options].
+The default export is
+[`remarkLintFileExtension`][api-remark-lint-file-extension].
 
-### `unified().use(remarkLintFileExtension[, config])`
+### `unified().use(remarkLintFileExtension[, options])`
 
-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 for unexpected extensions.
 
-The following options (default: `'md'`) are accepted:
+###### Parameters
 
-*   `string` (example `'markdown'`)
-    — preferred file extension (no dot)
+* `options` ([`Extensions`][api-extensions] or [`Options`][api-options],
+  optional)
+  — configuration
 
-> 👉 **Note**: does not warn when files have no file extensions (such as
-> `AUTHORS` or `LICENSE`).
+###### Returns
 
+Transform ([`Transformer` from `unified`][github-unified-transformer]).
+
+### `Extensions`
+
+File extension(s) (TypeScript type).
+
+###### Type
+
+```ts
+type Extensions = Array<string> | string
+```
+
+### `Options`
+
+Configuration (TypeScript type).
+
+###### Fields
+
+* `allowExtensionless` (`boolean`, default: `true`)
+  — allow no file extension such as `AUTHORS` or `LICENSE`
+* `extensions` ([`Extensions`][api-extensions], default: `['mdx', 'md']`)
+  — allowed file extension(s)
+
 ## Recommendation
 
@@ -146,4 +175,10 @@
 No messages.
 
+##### `readme.mdx`
+
+###### Out
+
+No messages.
+
 ##### `readme`
 
@@ -152,4 +187,14 @@
 No messages.
 
+##### `readme`
+
+When configured with `{ allowExtensionless: false }`.
+
+###### Out
+
+```text
+1:1: Unexpected missing file extension, expected `mdx` or `md`
+```
+
 ##### `readme.mkd`
 
@@ -157,5 +202,5 @@
 
 ```text
-1:1: Incorrect extension: use `md`
+1:1: Unexpected file extension `mkd`, expected `mdx` or `md`
 ```
 
@@ -168,18 +213,38 @@
 No messages.
 
+##### `readme.css`
+
+When configured with `[
+  'markdown', 'md',
+  'mdown',    'mdwn',
+  'mdx',      'mkd',
+  'mkdn',     'mkdown',
+  'ron'
+]`.
+
+###### Out
+
+```text
+1:1: Unexpected file extension `css`, expected `markdown`, `md`, `mdown`, …
+```
+
 ## 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-file-extension@3`,
+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.
@@ -187,53 +252,59 @@
 ## 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-extensions]: #extensions
 
-[build]: https://github.com/remarkjs/remark-lint/actions
+[api-options]: #options
 
-[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-lint.svg
+[api-remark-lint-file-extension]: #unifieduseremarklintfileextension-options
 
-[coverage]: https://codecov.io/github/remarkjs/remark-lint
+[author]: https://wooorm.com
 
-[downloads-badge]: https://img.shields.io/npm/dm/remark-lint-file-extension.svg
+[badge-build-image]: https://github.com/remarkjs/remark-lint/workflows/main/badge.svg
 
-[downloads]: https://www.npmjs.com/package/remark-lint-file-extension
+[badge-build-url]: https://github.com/remarkjs/remark-lint/actions
 
-[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-lint-file-extension.svg
+[badge-chat-image]: https://img.shields.io/badge/chat-discussions-success.svg
 
-[size]: https://bundlephobia.com/result?p=remark-lint-file-extension
+[badge-chat-url]: https://github.com/remarkjs/remark/discussions
 
-[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
+[badge-coverage-image]: https://img.shields.io/codecov/c/github/remarkjs/remark-lint.svg
 
-[backers-badge]: https://opencollective.com/unified/backers/badge.svg
+[badge-coverage-url]: https://codecov.io/github/remarkjs/remark-lint
 
-[collective]: https://opencollective.com/unified
+[badge-downloads-image]: https://img.shields.io/npm/dm/remark-lint-file-extension.svg
 
-[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
+[badge-downloads-url]: https://www.npmjs.com/package/remark-lint-file-extension
 
-[chat]: https://github.com/remarkjs/remark/discussions
+[badge-funding-backers-image]: https://opencollective.com/unified/backers/badge.svg
 
-[unified]: https://github.com/unifiedjs/unified
+[badge-funding-sponsors-image]: https://opencollective.com/unified/sponsors/badge.svg
 
-[remark]: https://github.com/remarkjs/remark
+[badge-funding-url]: https://opencollective.com/unified
 
-[mono]: https://github.com/remarkjs/remark-lint
+[badge-size-image]: https://img.shields.io/bundlejs/size/remark-lint-file-extension
 
-[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
+[badge-size-url]: https://bundlejs.com/?q=remark-lint-file-extension
 
-[esmsh]: https://esm.sh
+[esm-sh]: https://esm.sh
 
-[npm]: https://docs.npmjs.com/cli/install
+[file-license]: https://github.com/remarkjs/remark-lint/blob/main/license
 
-[health]: https://github.com/remarkjs/.github
+[github-dotfiles-coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md
 
-[contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md
+[github-dotfiles-contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md
 
-[support]: https://github.com/remarkjs/.github/blob/main/support.md
+[github-dotfiles-health]: https://github.com/remarkjs/.github
 
-[coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md
+[github-dotfiles-support]: https://github.com/remarkjs/.github/blob/main/support.md
 
-[license]: https://github.com/remarkjs/remark-lint/blob/main/license
+[github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
 
-[author]: https://wooorm.com
+[github-remark-lint]: https://github.com/remarkjs/remark-lint
+
+[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 v2.1.2..v3.0.0 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -1,23 +1,24 @@
-export default remarkLintFileExtension
-export type Root = import('mdast').Root
+export default remarkLintFileExtension;
+export type Root = import('mdast').Root;
 /**
- * Options.
+ * File extension(s).
  */
-export type Options = string
-declare const remarkLintFileExtension: import('unified').Plugin<
-  | void[]
-  | [
-      | string
-      | [
-          (
-            | boolean
-            | import('unified-lint-rule/lib/index.js').Label
-            | import('unified-lint-rule/lib/index.js').Severity
-          ),
-          (string | undefined)?
-        ]
-      | undefined
-    ],
-  import('mdast').Root,
-  import('mdast').Root
->
+export type Extensions = Array<string> | string;
+/**
+ * Configuration.
+ */
+export type Options = {
+    /**
+     * Allow no file extension such as `AUTHORS` or `LICENSE` (default: `true`).
+     */
+    allowExtensionless?: boolean | null | undefined;
+    /**
+     * Allowed file extension(s) (default: `['mdx', 'md']`).
+     */
+    extensions?: Readonly<Extensions> | null | undefined;
+};
+declare const remarkLintFileExtension: {
+    (config?: string | 0 | 1 | 2 | readonly string[] | Readonly<Options> | [level: import("../../node_modules/unified-lint-rule/lib/index.js").Label | import("../../node_modules/unified-lint-rule/lib/index.js").Severity, option?: Readonly<Extensions> | Readonly<Options> | null | undefined] | null | undefined): ((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 v2.1.2..v3.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":";mBAiGa,OAAO,OAAO,EAAE,IAAI;;;;yBAIpB,MAAM,MAAM,CAAC,GAAG,MAAM;;;;;;;;yBAKrB,OAAO,GAAG,IAAI,GAAG,SAAS;;;;iBAE1B,SAAS,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS;;AAarD;;;EAyDC"}
\ No newline at end of file
Size Files
8.8 KB → 14.7 KB (+5.9 KB 🟡) 4 → 5 (+1 🟡)
Command details
npm diff --diff=remark-lint-file-extension@2.1.2 --diff=remark-lint-file-extension@3.0.0 --diff-unified=2

See also the npm diff document.

Reported by ybiquitous/npm-diff-action@v1.5.0 (Node.js 20.12.2 and npm 10.7.0)

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/remark-lint-file-extension-3.0.0 branch 2 times, most recently from 8f53542 to d31edfd Compare May 1, 2024 16:12
@ybiquitous ybiquitous changed the title build(deps): bump remark-lint-file-extension from 2.1.2 to 3.0.0 feat(deps): bump remark-lint-file-extension from 2.1.2 to 3.0.0 May 1, 2024
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/remark-lint-file-extension-3.0.0 branch 2 times, most recently from ea129b4 to 656c72d Compare May 1, 2024 16:19
@ybiquitous ybiquitous enabled auto-merge (squash) May 1, 2024 16:19
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/remark-lint-file-extension-3.0.0 branch 7 times, most recently from 1edff66 to bf0d08b Compare May 1, 2024 16:26
Bumps [remark-lint-file-extension](https://github.com/remarkjs/remark-lint) from 2.1.2 to 3.0.0.
- [Release notes](https://github.com/remarkjs/remark-lint/releases)
- [Changelog](https://github.com/remarkjs/remark-lint/blob/3.0.0/history.md)
- [Commits](https://github.com/remarkjs/remark-lint/commits/3.0.0)

---
updated-dependencies:
- dependency-name: remark-lint-file-extension
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/remark-lint-file-extension-3.0.0 branch from bf0d08b to bb0faa6 Compare May 1, 2024 16:28
@ybiquitous ybiquitous merged commit b0d8c0d into main May 1, 2024
7 checks passed
@ybiquitous ybiquitous deleted the dependabot/npm_and_yarn/remark-lint-file-extension-3.0.0 branch May 1, 2024 16:28
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant