Skip to content

Commit a6676b2

Browse files
authored
test: add formatting script and test for grammars (#544)
1 parent 9173d8b commit a6676b2

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
"@types/node": "12.12.24",
114114
"clang-format": "1.3.0",
115115
"jasmine": "3.5.0",
116+
"prettier": "^1.19.1",
116117
"rollup": "1.29.0",
117118
"rollup-plugin-commonjs": "10.1.0",
118119
"tslint": "5.20.1",

scripts/format.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ find . -name "*.ts" \
99
-not -path "*/out/*" \
1010
-exec yarn clang-format -i {} +
1111

12+
find syntaxes/ -name "*.json" \
13+
-exec yarn prettier --write {} +
14+
1215
if [[ ! -z "${CI_MODE}" ]]; then
1316
git diff --diff-filter=ACMRT --exit-code || (echo "Files not formatted; please run 'yarn format'." && exit 1)
1417
fi

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,11 @@ performance-now@^2.1.0:
854854
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
855855
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
856856

857+
prettier@^1.19.1:
858+
version "1.19.1"
859+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
860+
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
861+
857862
psl@^1.1.24:
858863
version "1.3.0"
859864
resolved "https://registry.yarnpkg.com/psl/-/psl-1.3.0.tgz#e1ebf6a3b5564fa8376f3da2275da76d875ca1bd"

0 commit comments

Comments
 (0)