markdown-list-linter-cli
Advanced tools
Comparing version 0.0.4 to 0.0.5
#! /usr/bin/env node | ||
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0});const markdown_list_linter_1=require("markdown-list-linter"),commander_1=require("commander"),program=new commander_1.Command;program.name("markdown-list-linter").version("0.0.1").description("Tbc").option("-f, --file [value]","path to the markdown file that needs to be linted").parse(process.argv);const options=program.opts();if(process.argv.slice(2).length||program.outputHelp(),options.file){const n=typeof options.file=="string"?options.file:__dirname,e=(0,markdown_list_linter_1.lintMarkdownList)(n);console.log("SUMMARY:"),console.log(e.summary),console.log(),e.errorObject&&console.log("DETAILS:"),(_a=e.errorObject)===null||_a===void 0||_a.forEach(o=>{console.log(o.message),o.details.forEach(t=>{t.forEach(l=>{console.log(" "+l)}),console.log()}),console.log()})} | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const markdown_list_linter_1=require("markdown-list-linter"),commander_1=require("commander"),program=new commander_1.Command;program.name("markdown-list-linter").version("0.0.5").description("CLI tool to lint markdown lists to warn when list items are not alphabetically ordered").option("-f, --file [value]","path to the markdown file that needs to be linted").parse(process.argv);const options=program.opts();if(process.argv.slice(2).length||program.outputHelp(),options.file){const o=typeof options.file=="string"?options.file:__dirname,t=(0,markdown_list_linter_1.lintMarkdownList)(o);let e="";e+=`SUMMARY: | ||
`+t.summary+` | ||
`,t.errorObject&&(e+=` | ||
DETAILS: | ||
`),t.errorObject?.forEach(n=>{e+=n.message+` | ||
`,n.details.forEach((r,i)=>{e+=" Section #"+(i+1)+` | ||
`,r.forEach(s=>{e+=" "+s+` | ||
`}),e+=` | ||
`})}),console.log(e)} |
{ | ||
"name": "markdown-list-linter-cli", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "CLI tool to lint markdown lists to warn when list items are not alphabetically ordered", | ||
@@ -9,8 +9,7 @@ "main": "lib/index.min.js", | ||
}, | ||
"scripts": { | ||
"scripts": { | ||
"compile": "tsc --project tsconfig.json", | ||
"compile:dev": "tsc --project tsconfig.json --watch", | ||
"minify": "esbuild \"lib/index.js\" --minify --outfile=\"lib/index.min.js\"", | ||
"build": "npm run compile && npm run minify", | ||
"setup": "npm run build && npm install -g .", | ||
"build": "npm run compile && npm run minify", | ||
"dev": "npm run build && npm install -g .", | ||
"test": "jest" | ||
@@ -41,2 +40,3 @@ }, | ||
"devDependencies": { | ||
"@gmrchk/cli-testing-library": "^0.1.2", | ||
"@types/jest": "^29.5.2", | ||
@@ -43,0 +43,0 @@ "@types/node": "^20.4.0", |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
3269
12
1
0
7