From 271cee8bca32fba944d60081d5488fad0b34c670 Mon Sep 17 00:00:00 2001 From: nitrohorse <1514352+nitrohorse@users.noreply.github.com> Date: Sat, 3 Aug 2019 20:34:35 -0700 Subject: [PATCH] Update package.json --- .lintstagedrc | 3 +++ bin/html-beautify-check.sh | 4 +--- package.json | 5 ----- 3 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 .lintstagedrc diff --git a/.lintstagedrc b/.lintstagedrc new file mode 100644 index 00000000..e78ee96f --- /dev/null +++ b/.lintstagedrc @@ -0,0 +1,3 @@ +{ + "*.html": "bin/html-beautify-check.sh" +} \ No newline at end of file diff --git a/bin/html-beautify-check.sh b/bin/html-beautify-check.sh index fb90c91b..5014ed6a 100755 --- a/bin/html-beautify-check.sh +++ b/bin/html-beautify-check.sh @@ -1,8 +1,6 @@ #!/bin/bash -# A custom script, that formats the file(s) with html-beautify, -# but instead of changing it, it only errors with 0/1 if it needs to be changed -# Ref: https://web.archive.org/web/20190522172323/https://medium.com/@jtomaszewski/keep-your-code-clean-forever-65c71f7f2df +# Runs html-beautify's format check and errors with 0/1 if it needs to be changed. APPDIR=$(readlink -f $(dirname $(dirname $0))) TMPDIR=$(mktemp -d) cd $APPDIR diff --git a/package.json b/package.json index e2cabcad..51c74be6 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,6 @@ "pre-commit": "node_modules/.bin/lint-staged" } }, - "lint-staged": { - "**/*.html": [ - "bin/html-beautify-check.sh" - ] - }, "repository": { "type": "git", "url": "git+https://github.com/privacytoolsIO/privacytools.io.git"