File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22/**
3- * Markdown Lint Pipeline — wraps fix-tables.js + pad-tables.js + markdownlint-cli2
3+ * Markdown Lint Pipeline
4+ *
5+ * Pipeline:
6+ * 1. format-tables.js (single-pass table normalization)
7+ * 2. markdownlint-cli2 (general GFM rule enforcement)
8+ *
49 * Pure Node.js implementation for cross-platform compatibility.
510 */
611
@@ -44,7 +49,6 @@ for (let i = 0; i < args.length; i++) {
4449
4550if ( TARGETS . length === 0 ) usage ( ) ;
4651
47- // Normalize TARGET directory paths to remove trailing slash if present
4852for ( let i = 0 ; i < TARGETS . length ; i ++ ) {
4953 if ( ALL || ( fs . existsSync ( TARGETS [ i ] ) && fs . statSync ( TARGETS [ i ] ) . isDirectory ( ) ) ) {
5054 TARGETS [ i ] = TARGETS [ i ] . replace ( / [ / \\ ] $ / , '' ) ;
@@ -92,7 +96,6 @@ if (VALIDATE) {
9296 process . exit ( exitCode ) ;
9397}
9498
95- // Step 1: Format tables (fix separators + pad cells) in a single pass
9699if ( ! CHECK && ! DRY_RUN ) {
97100 for ( const target of TARGETS ) {
98101 const argsToPass = [ ] ;
@@ -111,7 +114,6 @@ if (!CHECK && !DRY_RUN) {
111114 process . exit ( 0 ) ;
112115}
113116
114- // Step 2: markdownlint with skill config
115117const lintArgs = [ 'markdownlint-cli2' , '--config' , CONFIG ] ;
116118for ( const target of TARGETS ) {
117119 const isDir = fs . existsSync ( target ) && fs . statSync ( target ) . isDirectory ( ) ;
You can’t perform that action at this time.
0 commit comments