Use js-beautify for formatting HTML #1089

Closed
nitrohorse wants to merge 21 commits from add-beautify into master
3 changed files with 4 additions and 8 deletions
Showing only changes of commit 271cee8bca - Show all commits

3
.lintstagedrc Normal file
View File

@@ -0,0 +1,3 @@
{
"*.html": "bin/html-beautify-check.sh"
}

View File

@@ -1,8 +1,6 @@
#!/bin/bash #!/bin/bash
# A custom script, that formats the file(s) with html-beautify, # Runs html-beautify's format check and errors with 0/1 if it needs to be changed.
# 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
APPDIR=$(readlink -f $(dirname $(dirname $0))) APPDIR=$(readlink -f $(dirname $(dirname $0)))
TMPDIR=$(mktemp -d) TMPDIR=$(mktemp -d)
cd $APPDIR cd $APPDIR

View File

@@ -18,11 +18,6 @@
"pre-commit": "node_modules/.bin/lint-staged" "pre-commit": "node_modules/.bin/lint-staged"
} }
}, },
"lint-staged": {
"**/*.html": [
"bin/html-beautify-check.sh"
]
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/privacytoolsIO/privacytools.io.git" "url": "git+https://github.com/privacytoolsIO/privacytools.io.git"