{"id":26287,"library":"remark-lint-table-pipe-alignment","title":"remark-lint-table-pipe-alignment","description":"A remark-lint rule that warns when GFM table cell dividers (pipes) are not aligned consistently. Current stable version is 4.1.1. This package is part of the remark-lint monorepo, which releases updates across all packages simultaneously. It enforces table formatting consistency, complementing other remark-lint table rules like remark-lint-table-cell-padding. Supports custom string length detection function for CJK/emoji characters. ESM-only, requires Node.js 16+.","status":"active","version":"4.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","align","cell","lint","pipe","remark","remark-lint","remark-lint-rule","rule","typescript"],"install":[{"cmd":"npm install remark-lint-table-pipe-alignment","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-table-pipe-alignment","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-table-pipe-alignment","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package, cannot use require(). Use import.","wrong":"const remarkLintTablePipeAlignment = require('remark-lint-table-pipe-alignment')","symbol":"remarkLintTablePipeAlignment (default)","correct":"import remarkLintTablePipeAlignment from 'remark-lint-table-pipe-alignment'"},{"note":"Options is a TypeScript type, not a runtime export. Use 'import type'.","wrong":"import { Options } from 'remark-lint-table-pipe-alignment'","symbol":"Options (type)","correct":"import type { Options } from 'remark-lint-table-pipe-alignment'"},{"note":"Must use remarkLint first as a plugin before adding lint rules.","wrong":"unified().use(remarkLintTablePipeAlignment, { stringLength: (s) => s.length })","symbol":"Plugin usage with unified","correct":"unified().use(remarkLint).use(remarkLintTablePipeAlignment, { stringLength: (s) => s.length })"}],"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkStringify from 'remark-stringify';\nimport remarkLint from 'remark-lint';\nimport remarkLintTablePipeAlignment from 'remark-lint-table-pipe-alignment';\nimport { read } from 'to-vfile';\nimport { reporter } from 'vfile-reporter';\n\nconst file = await read('example.md');\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintTablePipeAlignment)\n  .use(remarkStringify)\n  .process(file);\n\nconsole.error(reporter(file));","lang":"typescript","description":"Uses unified pipeline to parse Markdown, lint table pipe alignment, stringify, and report warnings."},"warnings":[{"fix":"Use ES module imports (import ... from 'remark-lint-table-pipe-alignment') instead of require().","message":"Package is ESM-only since v4. Requires Node.js 16+ and 'import' syntax.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade to v4+ and switch to ESM.","message":"Older versions (v3.x) still support CommonJS but are no longer maintained.","severity":"deprecated","affected_versions":">=3.0.0 <4.0.0"},{"fix":"Install remark-gfm and add .use(remarkGfm) before lint rules in the unified pipeline.","message":"The rule depends on remark-gfm to parse GFM tables; without it, it may not work as expected.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Provide a function that measures display width, e.g., using the 'string-width' package.","message":"The 'stringLength' option must handle all characters; CJK/emoji may be misaligned without custom length detection.","severity":"gotcha","affected_versions":">=4.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install remark-lint-table-pipe-alignment' and use import syntax.","cause":"Using require() in an ESM-only package or missing npm install.","error":"Cannot find module 'remark-lint-table-pipe-alignment'"},{"fix":"Add \"type\": \"module\" to package.json or rename file to .mjs.","cause":"Running the package without 'type': 'module' in package.json or without .mjs extension.","error":"Error: Cannot use import statement outside a module"},{"fix":"Use 'import remarkLintTablePipeAlignment from 'remark-lint-table-pipe-alignment''.","cause":"Importing the package incorrectly (e.g., const x = require('...') breaks ESM).","error":"TypeError: remarkLintTablePipeAlignment is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}