From af279e2fdc62678aea3188ade659a0fade50a863 Mon Sep 17 00:00:00 2001 From: Tobias Date: Thu, 25 Apr 2024 09:28:57 +0200 Subject: [PATCH] Fix "Check file endings" workflow to also allow `.md` files `npm run build` still works, so I don't think this is an issue. This also removes the second run of very similar code in the prettier workflow which I think is probably a legacy redundancy that can just be deleted. x --- .github/workflows/lint.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7f2532187..0a89fbd42 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,12 +7,12 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - notJSONs=`find data/ -type f -not -iname "*.json"` - for f in $notJSONs + disallowedFiles=`find data/ -type f -not -iname "*.json" -not -iname "*.md"` + for f in $disallowedFiles do - echo "::error file=$f::File $f is not a .json file." + echo "::error file=$f::File $f is not a .json or .md file." done - if [ ! -z "$notJSONs" ]; then exit 1; fi + if [ ! -z "$disallowedFiles" ]; then exit 1; fi prettier: name: Check for code formatting mistakes @@ -23,7 +23,6 @@ jobs: with: node-version-file: '.nvmrc' - run: npm clean-install - - run: 'for f in `find data/ -type f -not -iname "*.json"`; do echo "::error File $f is not a .json file."; done' - run: npm run lint codespell: @@ -37,4 +36,3 @@ jobs: skip: ./.git,./dist,./data/deprecated.json ignore_words_list: "auxilary,casette,cemetary,chancel,discus,extentions,faiway,generat,goverment,guerilla,guyser,kindergarden,ore,pavillion,sculpter,storys,linz,te" only_warn: 1 -