diff --git a/packages/unified-lint-rule/index.js b/packages/unified-lint-rule/index.js index 4131b178..b44eddbe 100644 --- a/packages/unified-lint-rule/index.js +++ b/packages/unified-lint-rule/index.js @@ -74,15 +74,8 @@ * * Nothing (`Promise` or `undefined`). * - * ### `RuleMeta` - * - * Deprecated. - * - * - * * [api-meta]: #meta * [api-rule]: #rule - * [api-rule-meta]: #rulemeta * [api-lint-rule]: #lintrulemeta-rule * [github-unist-node]: https://github.com/syntax-tree/unist#node * [github-unified-plugin]: https://github.com/unifiedjs/unified#plugin @@ -94,9 +87,6 @@ */ /** - * @typedef {import('./lib/index.js').Meta} RuleMeta - * To do: deprecate. - * * @typedef {import('./lib/index.js').Meta} Meta */ diff --git a/packages/unified-lint-rule/readme.md b/packages/unified-lint-rule/readme.md index 3fdc3436..c6472df4 100644 --- a/packages/unified-lint-rule/readme.md +++ b/packages/unified-lint-rule/readme.md @@ -22,7 +22,6 @@ * [`lintRule(meta, rule)`](#lintrulemeta-rule) * [`Meta`](#meta) * [`Rule`](#rule) - * [`RuleMeta`](#rulemeta) * [Compatibility](#compatibility) * [Contribute](#contribute) * [License](#license) @@ -83,9 +82,8 @@ export default remarkLintFileExtension This package exports the identifier [`lintRule`][api-lint-rule]. -It exports the [TypeScript][typescript] types -[`Meta`][api-meta] and -[`RuleMeta`][api-rule-meta]. +It exports the [TypeScript][typescript] type +[`Meta`][api-meta]. There is no default export. ### `lintRule(meta, rule)` @@ -131,12 +129,6 @@ Rule (TypeScript type). Nothing (`Promise` or `undefined`). -### `RuleMeta` - -Deprecated. - - - ## Compatibility Projects maintained by the unified collective are compatible with maintained @@ -168,8 +160,6 @@ abide by its terms. [api-rule]: #rule -[api-rule-meta]: #rulemeta - [author]: https://wooorm.com [badge-build-image]: https://github.com/remarkjs/remark-lint/workflows/main/badge.svg diff --git a/script/build-packages.js b/script/build-packages.js index 45701de6..2a4bc87a 100644 --- a/script/build-packages.js +++ b/script/build-packages.js @@ -5,11 +5,15 @@ import {write} from 'to-vfile' import {plugins, presets} from './info.js' import {pipelinePackage} from './pipeline-package.js' -const results = await Promise.all( - [...plugins, ...presets].map(function (d) { +const results = await Promise.all([ + pipelinePackage('unified-lint-rule'), + ...plugins.map(function (d) { + return pipelinePackage(d.name) + }), + ...presets.map(function (d) { return pipelinePackage(d.name) }) -) +]) const files = results.flat() diff --git a/script/info.js b/script/info.js index 47b610e2..3947f691 100644 --- a/script/info.js +++ b/script/info.js @@ -85,12 +85,12 @@ export const presets = [] const names = await fs.readdir(packagesUrl) for (const name of names) { - if (name.startsWith('remark-lint')) { - await addPlugin(name) - } - if (name.startsWith('remark-preset-lint-')) { await addPreset(name) + } else if (name === 'unified-lint-rule') { + // Empty. + } else { + await addPlugin(name) } } @@ -111,9 +111,7 @@ async function addPlugin(name) { /** @type {string | undefined} */ let ruleId - if (name === 'remark-lint') { - // Empty. - } else { + if (name.startsWith('remark-lint-')) { ruleId = name.slice('remark-lint-'.length) const moduleTag = tags.find(function (d) { diff --git a/script/pipeline-package.js b/script/pipeline-package.js index 0ebaea08..c940ca48 100644 --- a/script/pipeline-package.js +++ b/script/pipeline-package.js @@ -295,7 +295,8 @@ async function generateReadme(state) { return d.name === state.name }) ) { - const name = state.name === 'remark-lint' ? state.id : state.origin + const name = state.name.startsWith('remark-lint-') ? state.origin : state.id + assert(name) if ( !('default' in indexModule) ||