Skip to content

Commit f126955

Browse files
authored
Merge pull request #108 from per1234/fix-check-npm
Install referenced schema in "Check npm" workflow
2 parents 98bce44 + 33f0ffb commit f126955

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/check-npm.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,23 @@ jobs:
4444

4545
# This schema is referenced by the package.json schema, so must also be accessible.
4646
- name: Download JSON schema for eslintrc.json
47-
id: download-referenced-schema
47+
id: download-eslintrc-schema
4848
uses: carlosperate/download-file-action@v1
4949
with:
5050
# See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/eslintrc.json
5151
file-url: https://json.schemastore.org/eslintrc.json
5252
location: ${{ runner.temp }}/json-schema
53-
file-name: eslintrc-json-schema.json
53+
file-name: eslintrc-schema.json
54+
55+
# This schema is referenced by the package.json schema, so must also be accessible.
56+
- name: Download JSON schema for eslintrc.json
57+
id: download-prettierrc-schema
58+
uses: carlosperate/download-file-action@v1
59+
with:
60+
# See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/prettierrc.json
61+
file-url: https://json.schemastore.org/prettierrc.json
62+
location: ${{ runner.temp }}/json-schema
63+
file-name: prettierrc-schema.json
5464

5565
- name: Install JSON schema validator
5666
# package.json schema is draft-04, which is not supported by ajv-cli >=4.
@@ -61,7 +71,8 @@ jobs:
6171
# See: https://github.com/ajv-validator/ajv-cli#readme
6272
ajv validate \
6373
-s "${{ steps.download-schema.outputs.file-path }}" \
64-
-r "${{ steps.download-referenced-schema.outputs.file-path }}" \
74+
-r "${{ steps.download-eslintrc-schema.outputs.file-path }}" \
75+
-r "${{ steps.download-prettierrc-schema.outputs.file-path }}" \
6576
-d "./**/package.json"
6677
6778
check-sync:

0 commit comments

Comments
 (0)