summaryrefslogtreecommitdiff
path: root/validate_static
blob: 5980cd5eb93c4245a08ca3bd5df5f1c64d1a2665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

set -o errexit -o nounset -o pipefail
shopt -s dotglob extglob globstar

export PATH="$PWD/node_modules/.bin:$PATH"

for file in static/**/*.@(json|webmanifest); do
    json_verify < "$file" >/dev/null
done

xmllint --noout static/**/*.@(html|svg|xml)
eslint static/**/!(zip.min|z-worker).js
stylelint static/**/*.css
validatornu --Werror --also-check-css --also-check-svg static/**/*.@(css|html|svg)