{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiag5ieidk6vei7n5erdr3rrmlhnhbcg7o6pjx63h2lthhc4a7vuzq",
    "uri": "at://did:plc:g4wcucb6ko2frmko2x3lvgyi/app.bsky.feed.post/3lsff6bmjrzl2"
  },
  "path": "/2025/06/25/textlint-v15/",
  "publishedAt": "2026-03-04T05:18:48.900Z",
  "site": "https://efcl.info",
  "tags": [
    "Release v15.0.0 · textlint/textlint",
    "textlint v15.0.0 | textlint",
    "https://nodejs.org/en/about/previous-releases",
    "Migration Guide to textlint v15 | textlint",
    "GitHub Issue #1412",
    "https://textlint.org/docs/mcp/",
    "Key Changes - Model Context Protocol",
    "Structured Content",
    "MCP 2025-06-18 で追加された structured tool output を試す",
    "Output Schema",
    "Enhance MCP Server Support with 2025-06-18 Specification Updates · Issue #1563 · textlint/textlint",
    "pnpm",
    "Vitest",
    "use pnpm instead of npm · Issue #1537 · textlint/textlint",
    "refactor: migrate test runner from Mocha to Vitest by azu · Pull Request #1544 · textlint/textlint",
    "Merge Gatekeeper",
    "Deploy PR Preview action",
    "CI: add Merge Gatekeeper workflow for pull requests by azu · Pull Request #1577 · textlint/textlint",
    "feat: replace Netlify with pr-preview-action by azu · Pull Request #1580 · textlint/textlint",
    "Meta: ECMAScript Modules · Issue #1307 · textlint/textlint",
    "Recreate –cache flag · Issue #1327 · textlint/textlint",
    "ESLint for TypeScript · Issue #685 · textlint/textlint",
    "feat: migrate from Mocha to Node.js built-in test runner (node:test) · Issue #1545 · textlint/textlint",
    "textlint-rule-preset-ai-writing",
    "Biome v2",
    "Assist",
    "Issues · textlint/textlint",
    "Sponsor @azu on GitHub Sponsors",
    "textlint v15.0.0のリリースノート",
    "v15移行ガイド",
    "新API ドキュメント",
    "実装例",
    "@textlint"
  ],
  "textContent": "textlint v15.0.0をリリースしました!\n\n  * Release v15.0.0 · textlint/textlint\n  * textlint v15.0.0 | textlint\n\n\n\ntextlint v15は、v12.3.0から非推奨としてマークされていた古いAPIをすべて削除するメジャーリリースです。\n\n## textlint v15.0.0の変更点\n\n主要な変更点は次の通りです。\n\n## Breaking Changes\n\n  * Node.js 20+のサポート(Node.js 16,18はサポート終了\n  * `TextLintEngine`を削除 → `createLinter()`\n  * `TextFixEngine`を削除 → `createLinter()`\n  * `TextLintCore`を削除 → `createLinter()`または`@textlint/kernel`\n  * `textlint`(シングルトンインスタンス)を削除 → `createLinter()`\n  * `createFormatter`を削除 → `loadFormatter()`を\n\n\n\n## Node.js 20以上が必要\n\ntextlint v15では、Node.js 20.0.0以上が必要になりました。 Nodejs 18はEOL(End of Life)となっているため、Node.js 20以上を使用する必要があります。\n\n  * https://nodejs.org/en/about/previous-releases\n\n\n\n## 非推奨APIの削除\n\n`textlint`パッケージをNode.jsモジュールとして利用する場合のみ影響を受ける変更です。\n\ntextlint v15では、非推奨となっていた次のAPIが完全に削除されました。\n\n移行ガイドは次のページに用意しています。\n\n  * Migration Guide to textlint v15 | textlint\n\n\n\n### `TextLintEngine` → `createLinter()`\n\n**変更前(v14以前):**\n\n\n    const { TextLintEngine } = require(\"textlint\");\n\n    const engine = new TextLintEngine({\n        configFile: \".textlintrc.json\"\n    });\n    const results = await engine.executeOnFiles([\"*.md\"]);\n    const output = engine.formatResults(results);\n    console.log(output);\n\n\n**変更後(v15以降):**\n\n\n    import { createLinter, loadTextlintrc, loadLinterFormatter } from \"textlint\";\n\n    const descriptor = await loadTextlintrc({\n        configFilePath: \".textlintrc.json\"\n    });\n    const linter = createLinter({ descriptor });\n    const results = await linter.lintFiles([\"*.md\"]);\n    const formatter = await loadLinterFormatter({ formatterName: \"stylish\" });\n    const output = formatter.format(results);\n    console.log(output);\n\n\n### `TextFixEngine` → `createLinter()`\n\n**変更前(v14以前):**\n\n\n    const { TextFixEngine } = require(\"textlint\");\n\n    const engine = new TextFixEngine();\n    const results = await engine.executeOnFiles([\"*.md\"]);\n\n\n**変更後(v15以降):**\n\n\n    import { createLinter, loadTextlintrc } from \"textlint\";\n\n    const descriptor = await loadTextlintrc();\n    const linter = createLinter({ descriptor });\n    const results = await linter.fixFiles([\"*.md\"]);\n\n\n### `TextLintCore` → `createLinter()`\n\n**変更前(v14以前):**\n\n\n    const { TextLintCore } = require(\"textlint\");\n\n    const textlint = new TextLintCore();\n    textlint.setupRules({\n        \"rule-name\": require(\"./my-rule\")\n    });\n    const result = await textlint.lintText(\"Hello world\", \"test.md\");\n\n\n**変更後(v15以降):**\n\n\n    import { createLinter } from \"textlint\";\n    import { TextlintKernelDescriptor } from \"@textlint/kernel\";\n    import { moduleInterop } from \"@textlint/module-interop\";\n\n    const descriptor = new TextlintKernelDescriptor({\n        rules: [\n            {\n                ruleId: \"rule-name\",\n                rule: moduleInterop((await import(\"./my-rule\")).default)\n            }\n        ]\n    });\n    const linter = createLinter({ descriptor });\n    const result = await linter.lintText(\"Hello world\", \"test.md\");\n\n\n## その他の改善\n\n### Exit Statusの改善\n\ntextlint v15では、ESLintの動作に合わせてExit Statusが改善されました。\n\n  * Fatalエラー: Exit Status 2を返す(従来は1)\n  * Lintエラー: Exit Status 1を返す(変更なし)\n  * 成功: Exit Status 0を返す(変更なし)\n\n\n\n\n    # v15+ behavior\n    textlint nonexistent-file.md     # Exit Status: 2 (file search error)\n    textlint file-with-errors.md     # Exit Status: 1 (lint errors)\n    textlint clean-file.md           # Exit Status: 0 (success)\n\n\n### 絶対パスのファイルも`.textlintignore`のパターンを尊重\n\ntextlint v15では、絶対パスのファイルが`.textlintignore`パターンを正しく尊重しない問題が修正されました。\n\n以前は、`.textlintignore`で記載されたパターンがマッチしていても、絶対パスとして渡された場合は無視されていませんでした。 v15では、絶対パスのファイルも`.textlintignore`のパターンを正しく尊重するようになりました。\n\n\n    # Before v15 (Bug)\n    textlint /absolute/path/to/ignored-file.md  # Lintされてしまっていた\n\n    # v15+ (Fixed)\n    textlint /absolute/path/to/ignored-file.md  # Lintの対象外となった\n\n\n詳しくは、GitHub Issue #1412を参照してください。\n\n### Model Context Protocol (MCP)の統合強化\n\ntextlint v14.8.0から、`textlint --mcp`でtextlintをMCPサーバーとして起動できます。\n\n  * https://textlint.org/docs/mcp/\n\n\n\ntextlint v15では、MCPのサポートを改善しています。 2025-06-18のKey Changes - Model Context Protocolに基づいて、次の変更が行われました。\n\n  * Structured Content: 出力結果の構造を事前に定義することで、AIツールが結果をより正確に解釈できるようになりました\n    * MCP 2025-06-18 で追加された structured tool output を試す\n  * Output Schema: 出力結果のJSON Schemaを提供することで、AIツールが結果を正確に解釈できるようにしました\n  * `isError: true`の追加: エラーが発生した場合、`isError: true`を設定することで、AIツールでエラー状態を認識できるようにしました\n\n\n\n詳しくは、次のGitHub Issueを参照してください。\n\n  * Enhance MCP Server Support with 2025-06-18 Specification Updates · Issue #1563 · textlint/textlint\n\n\n\n## まとめ\n\ntextlint v15では、非推奨となっているものを削除したり、動作の一貫性を改善するような変更をしています。\n\nまたtextlintの内部的にも、pnpmとVitestへ移行し、 CIの合計時間を21m 5s → 7m 20sに短縮しています。(Windowsでnpmのインストールが遅かったのがボトルネック)\n\n  * use pnpm instead of npm · Issue #1537 · textlint/textlint\n  * refactor: migrate test runner from Mocha to Vitest by azu · Pull Request #1544 · textlint/textlint\n\n\n\n他にもMerge Gatekeeperを入れてAuto Mergeをできるようにしたり、Netlifyのキャッシュがやたら不安定なのでDeploy PR Preview actionを使ってPRのプレビューを作成するなどの改善をしています。\n\n  * CI: add Merge Gatekeeper workflow for pull requests by azu · Pull Request #1577 · textlint/textlint\n  * feat: replace Netlify with pr-preview-action by azu · Pull Request #1580 · textlint/textlint\n\n\n\nこの辺を整理したので、textlint自体の開発体験もだいぶ良くなっています。\n\nまだやるべきことはたくさんあるので、興味あるひとは是非Contributorとして参加してください!\n\n  * Meta: ECMAScript Modules · Issue #1307 · textlint/textlint\n  * Recreate –cache flag · Issue #1327 · textlint/textlint\n  * ESLint for TypeScript · Issue #685 · textlint/textlint\n  * feat: migrate from Mocha to Node.js built-in test runner (node:test) · Issue #1545 · textlint/textlint\n    * これは今回のメジャーアップデートでNode.js 18が切れたので可能になった\n\n\n\n実験的なものとしてtextlint-rule-preset-ai-writingとか書きながら考えていましたが、Linterの役割はちょっと広がってきているのかなと思いました。 Biome v2で追加されたAssistもそうですが、ErrorやWarningではなくSuggestionに近い部分も増えてきているように感じます。Suggestionに関してはLinterの役割なのかは微妙なところです。しかし、この辺りの機能はLinterの延長として実装されることも多くなっています。\n\n特に自然言語はauto fixが難しいので、Suggestionのような形でHintを提供できる仕組みがあると、人間とAIにとっても使える感じのツールになるんじゃないかなーと思っています。\n\ntextlintでは、Contributionを歓迎しています。\n\n  * Issues · textlint/textlint\n\n\n\nまた、GitHub Sponsorsでのサポートも歓迎しています。\n\n  * Sponsor @azu on GitHub Sponsors\n\n\n\n## 関連リンク\n\n  * textlint v15.0.0のリリースノート\n  * v15移行ガイド\n  * 新API ドキュメント - 新しいAPIのドキュメント\n  * 実装例 - 新しいAPIを使った例\n\n",
  "title": "textlint v15.0.0をリリースしました。非推奨APIの削除とNode.js 20+サポート/MCPサーバの改善",
  "updatedAt": "2025-06-25T00:00:00.000Z"
}