From 1569ab329d097bd2bb7a41adf6147405c5a8b525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sun, 21 Apr 2019 14:58:19 +0800 Subject: [PATCH] prettier md demo (#16188) --- .prettierignore | 3 --- .prettierrc | 3 ++- package.json | 4 ++-- scripts/prettier.js | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.prettierignore b/.prettierignore index b50172d492..548c62f200 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,4 @@ -**/*.md **/*.svg -**/*.ejs -**/*.html package.json .umi .umi-production \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 1dbad51f4e..3dc446bfad 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,6 +2,7 @@ "singleQuote": true, "trailingComma": "all", "printWidth": 100, + "proseWrap": "never", "overrides": [ { "files": ".prettierrc", @@ -10,4 +11,4 @@ } } ] -} +} \ No newline at end of file diff --git a/package.json b/package.json index 0d53ac0e88..57474262d6 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "pre-commit": "^1.2.2", "preact": "^8.3.1", "preact-compat": "^3.18.4", - "prettier": "^1.15.3", + "prettier": "^1.17.0", "querystring": "^0.2.0", "rc-queue-anim": "^1.6.6", "rc-scroll-anim": "^2.5.7", @@ -262,4 +262,4 @@ "lib/**/style/*", "*.less" ] -} +} \ No newline at end of file diff --git a/scripts/prettier.js b/scripts/prettier.js index 84e723aaaa..d0282d9834 100644 --- a/scripts/prettier.js +++ b/scripts/prettier.js @@ -36,7 +36,7 @@ if (program.pre) { ]; // get all ts, js, less files - ['**/*.ts*', '**/*.js*', '**/*.less'].forEach(pattern => { + ['**/*.ts*', '**/*.js*', '**/*.less', '**/*.md', '**/*.html'].forEach(pattern => { const matchFiles = glob.sync(pattern, { ignore: ignoreFiles, });