From fa0e27d5e6576669150b577dd096b7716098c078 Mon Sep 17 00:00:00 2001 From: JamBalaya56562 Date: Sun, 5 Jul 2026 18:45:42 +0900 Subject: [PATCH 1/2] Migrate markdownlint-cli to markdownlint-cli2 (single config file) Consolidate the Markdown lint configuration (.markdownlint.json rules, .markdownlintignore excludes, and the '**/*.md' npm-script glob) into a single .markdownlint-cli2.jsonc (config + globs + ignores), and remove the two old files. Script names are unchanged, so the compound test/fix scripts and the CI step (npm run --silent markdownlint) need no change. For consistency with FreshRSS/FreshRSS#8987. --- .markdownlint-cli2.jsonc | 35 +++++++++ .markdownlint.json | 20 ----- .markdownlintignore | 6 -- package-lock.json | 166 +++++++++++++-------------------------- package.json | 6 +- 5 files changed, 91 insertions(+), 142 deletions(-) create mode 100644 .markdownlint-cli2.jsonc delete mode 100644 .markdownlint.json delete mode 100644 .markdownlintignore diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc new file mode 100644 index 00000000..c1ba0415 --- /dev/null +++ b/.markdownlint-cli2.jsonc @@ -0,0 +1,35 @@ +{ + // markdownlint rule configuration (previously .markdownlint.json) + "config": { + "default": true, + "blanks-around-fences": false, + "blanks-around-lists": false, + "first-line-heading": false, + "line-length": false, + "no-blanks-blockquote": false, + "no-hard-tabs": false, + "no-inline-html": { + "allowed_elements": ["br", "img", "kbd", "details", "summary"] + }, + "no-multiple-blanks": { + "maximum": 2 + }, + "no-trailing-spaces": true, + "ul-indent": false, + "ul-style": { + "style": "consistent" + } + }, + // Markdown files to lint (previously the '**/*.md' CLI argument) + "globs": [ + "**/*.md" + ], + // Paths to ignore (previously .markdownlintignore) + "ignores": [ + "**/node_modules/**", + "symbolic/**", + "third-party/**", + "tmp/**", + "vendor/**" + ] +} diff --git a/.markdownlint.json b/.markdownlint.json deleted file mode 100644 index 79fe6b58..00000000 --- a/.markdownlint.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "default": true, - "blanks-around-fences": false, - "blanks-around-lists": false, - "first-line-heading": false, - "line-length": false, - "no-blanks-blockquote": false, - "no-hard-tabs": false, - "no-inline-html": { - "allowed_elements": ["br", "img", "kbd", "details", "summary"] - }, - "no-multiple-blanks": { - "maximum": 2 - }, - "no-trailing-spaces": true, - "ul-indent": false, - "ul-style": { - "style": "consistent" - } -} diff --git a/.markdownlintignore b/.markdownlintignore deleted file mode 100644 index 686db074..00000000 --- a/.markdownlintignore +++ /dev/null @@ -1,6 +0,0 @@ -.git/ -node_modules/ -symbolic/ -third-party/ -tmp/ -vendor/ diff --git a/package-lock.json b/package-lock.json index 771137a6..3d11d403 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@stylistic/stylelint-plugin": "^5.2.1", "eslint": "^9.39.4", "globals": "^17.4.0", - "markdownlint-cli": "^0.49.0", + "markdownlint-cli2": "^0.23.0", "neostandard": "^0.13.0", "rtlcss": "^4.3.0", "stylelint": "^17.14.0", @@ -1286,16 +1286,6 @@ "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", "dev": true }, - "node_modules/commander": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", - "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=22.12.0" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1460,15 +1450,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -2684,15 +2665,6 @@ "node": ">=0.8.19" } }, - "node_modules/ini": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", - "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -3439,76 +3411,80 @@ "url": "https://github.com/sponsors/DavidAnson" } }, - "node_modules/markdownlint-cli": { - "version": "0.49.0", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.49.0.tgz", - "integrity": "sha512-vS5tWq5W91Gg33LD4pyAaXPclnz/sRvo6/RGOyDQjQ3eds2DkK6H4szUuE0M9TiRB/u/VBx1gtd9Ktrtx5WlSA==", + "node_modules/markdownlint-cli2": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.23.0.tgz", + "integrity": "sha512-1nmgQmU/ZTMRVwYCDs7i1HI3zfBISnT2NNRv+9V01oOLZbAtqL+a7tldpPhBWBVBten3FqhMCGV6EUh9McqutQ==", "dev": true, "license": "MIT", "dependencies": { - "commander": "~15.0.0", - "deep-extend": "~0.6.0", - "ignore": "~7.0.5", - "js-yaml": "~4.2.0", - "jsonc-parser": "~3.3.1", - "jsonpointer": "~5.0.1", - "markdown-it": "~14.2.0", - "markdownlint": "~0.41.0", - "minimatch": "~10.2.5", - "run-con": "~1.3.2", - "smol-toml": "~1.6.1", - "tinyglobby": "~0.2.17" + "globby": "16.2.0", + "js-yaml": "5.2.0", + "jsonc-parser": "3.3.1", + "jsonpointer": "5.0.1", + "markdown-it": "14.2.0", + "markdownlint": "0.41.0", + "markdownlint-cli2-formatter-default": "0.0.6", + "micromatch": "4.0.8", + "smol-toml": "1.7.0" }, "bin": { - "markdownlint": "markdownlint.js" + "markdownlint-cli2": "markdownlint-cli2-bin.mjs" }, "engines": { "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" } }, - "node_modules/markdownlint-cli/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "node_modules/markdownlint-cli2-formatter-default": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/markdownlint-cli2-formatter-default/-/markdownlint-cli2-formatter-default-0.0.6.tgz", + "integrity": "sha512-VVDGKsq9sgzu378swJ0fcHfSicUnMxnL8gnLm/Q4J/xsNJ4e5bA6lvAz7PCzIl0/No0lHyaWdqVD2jotxOSFMQ==", "dev": true, - "engines": { - "node": "18 || 20 || >=22" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/DavidAnson" + }, + "peerDependencies": { + "markdownlint-cli2": ">=0.0.4" } }, - "node_modules/markdownlint-cli/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "node_modules/markdownlint-cli2/node_modules/js-yaml": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.0.tgz", + "integrity": "sha512-YeLUMlvR4Ou1B119LIaM0r65JvbOBooJDc9yEu0dClb/uSC5P4FrLU8OCCz/HXWvtPoIrR0dRzABTjo1sTN9Bw==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", "dependencies": { - "balanced-match": "^4.0.2" + "argparse": "^2.0.1" }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/markdownlint-cli/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "engines": { - "node": ">= 4" + "bin": { + "js-yaml": "bin/js-yaml.mjs" } }, - "node_modules/markdownlint-cli/node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "node_modules/markdownlint-cli2/node_modules/smol-toml": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.7.0.tgz", + "integrity": "sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ==", "dev": true, - "dependencies": { - "brace-expansion": "^5.0.5" - }, + "license": "BSD-3-Clause", "engines": { - "node": "18 || 20 || >=22" + "node": ">= 18" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/cyyynthia" } }, "node_modules/math-intrinsics": { @@ -4138,15 +4114,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4891,21 +4858,6 @@ "node": ">=12.0.0" } }, - "node_modules/run-con": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.3.2.tgz", - "integrity": "sha512-CcfE+mYiTcKEzg0IqS08+efdnH0oJ3zV0wSUFBNrMHMuxCtXvBCLzCJHatwuXDcu/RlhjTziTo/a1ruQik6/Yg==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~4.1.0", - "minimist": "^1.2.8", - "strip-json-comments": "~3.1.1" - }, - "bin": { - "run-con": "cli.js" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5173,18 +5125,6 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/smol-toml": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz", - "integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==", - "dev": true, - "engines": { - "node": ">= 18" - }, - "funding": { - "url": "https://github.com/sponsors/cyyynthia" - } - }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", diff --git a/package.json b/package.json index 14fd0abf..f87d668e 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "scripts": { "eslint": "eslint .", "eslint_fix": "eslint --fix .", - "markdownlint": "markdownlint '**/*.md'", - "markdownlint_fix": "markdownlint --fix '**/*.md'", + "markdownlint": "markdownlint-cli2", + "markdownlint_fix": "markdownlint-cli2 --fix", "rtlcss": "npm run symbolic && rtlcss -d symbolic/ && find -L symbolic/ -type f -name '*.rtl.rtl.css' -delete", "stylelint": "stylelint '**/*.css'", "stylelint_fix": "stylelint --fix '**/*.css'", @@ -35,7 +35,7 @@ "eslint": "^9.39.4", "@eslint/js": "^9.39.4", "globals": "^17.4.0", - "markdownlint-cli": "^0.49.0", + "markdownlint-cli2": "^0.23.0", "neostandard": "^0.13.0", "rtlcss": "^4.3.0", "stylelint": "^17.14.0", From 7d0cbd3c5f017a69ce899d9fdb63c9cb6d126d74 Mon Sep 17 00:00:00 2001 From: JamBalaya56562 Date: Sun, 5 Jul 2026 21:22:12 +0900 Subject: [PATCH 2/2] Apply review feedback from FreshRSS/FreshRSS#8987 - Reduce obvious comments in .markdownlint-cli2.jsonc (keep only the non-obvious note on globs) - Add JSONC to .editorconfig ([*.json] -> [*.{json,jsonc}]) --- .editorconfig | 2 +- .markdownlint-cli2.jsonc | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index e3fdf58e..9a29a37a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,7 +15,7 @@ indent_style = tab [*.js] indent_style = tab -[*.json] +[*.{json,jsonc}] indent_style = tab [*.md] diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index c1ba0415..131a2908 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -1,5 +1,4 @@ { - // markdownlint rule configuration (previously .markdownlint.json) "config": { "default": true, "blanks-around-fences": false, @@ -24,7 +23,6 @@ "globs": [ "**/*.md" ], - // Paths to ignore (previously .markdownlintignore) "ignores": [ "**/node_modules/**", "symbolic/**",