Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/api/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ changes:
description: Added `--experimental-transform-types` flag.
-->

<!--introduced_in=v22.6.0-->

> Stability: 1.1 - Active development

## Enabling
Expand Down
8 changes: 8 additions & 0 deletions tools/lint-md/lint-md.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ paths.forEach(async (path) => {
const fileContents = file.toString();
const result = await linter.process(file);
const isDifferent = fileContents !== result.toString();

if (path.startsWith('doc/api/')) {
if (!fileContents.includes('introduced_in')) {
console.error(`${path} is missing an 'introduced_in' version. Please add one.`);
process.exitCode = 1;
}
}

if (format) {
if (isDifferent) {
fs.writeFileSync(path, result.toString());
Expand Down
Loading