From d5d22f3df47474d68188af946c83fc9352600f66 Mon Sep 17 00:00:00 2001 From: hustcc Date: Mon, 24 Dec 2018 20:53:13 +0800 Subject: [PATCH] feat(cli): use getDescription in cli --- bin/Lint/index.js | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/Lint/index.js b/bin/Lint/index.js index c9153ab..fc839de 100644 --- a/bin/Lint/index.js +++ b/bin/Lint/index.js @@ -2,6 +2,7 @@ const { h, render, Component, Color } = require('ink'); const loadMdFiles = require('../helper/file'); const lint = require('./lint'); const string = require('../helper/string'); +const { getDescription } = require('../../lib'); /** * Lint 组件 @@ -70,7 +71,7 @@ module.exports = class Lint extends Component { ' ', h('span', {}, h(Color, { grey: true }, string.rightPad(`${type}`, 24))), ' ', - h(Color, props, text), + h(Color, props, `${getDescription(type).message} ${text}`), ]); } diff --git a/package.json b/package.json index f7cc2ea..ca5db12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lint-md", - "version": "0.0.7", + "version": "0.0.8", "description": "Cli tool to lint your markdown file for Chinese.", "main": "lib/index.js", "bin": {