From 8112712c86ff4ec5cbed935661936256798f0317 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Tue, 25 Apr 2017 16:47:21 +0200 Subject: [PATCH] Fix the rules used when working with the pre-commit hook The real issue is: https://github.com/prettier/prettier/issues/98 --- hooks/pre-commit | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hooks/pre-commit b/hooks/pre-commit index 749ca18..f00e623 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -6,8 +6,9 @@ diffs=$(node_modules/.bin/prettier-space-parenthesis -l $jsfiles) [ -z "$diffs" ] && exit 0 echo "here" -echo >&2 "Javascript files must be formatted with prettier-space-parenthesis. Please run:" -echo >&2 "node_modules/.bin/prettier-space-parenthesis --write "$diffs"" -echo >&2 "or install the prettier-atom-space-parenthesis module" +echo >&2 "Javascript files must be formatted with prettier-space-parenthesis." +echo >&2 "Please run:" +echo >&2 "node_modules/.bin/prettier-space-parenthesis --single-quote --trailing-comma=es5 --parenthesis-space --write "$diffs"" +echo >&2 "or install the prettier-atom-space-parenthesis module in the Atom editor" exit 1