Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds JSON linting #223

Merged
merged 5 commits into from
May 15, 2024
Merged

Adds JSON linting #223

merged 5 commits into from
May 15, 2024

Conversation

xibz
Copy link
Contributor

@xibz xibz commented May 13, 2024

eslint --fix

This commit addresses some of the inconsistencies in our
JSON files

@xibz xibz added this to the v0.4 milestone May 13, 2024
@xibz xibz requested a review from a team as a code owner May 13, 2024 16:23
@xibz
Copy link
Contributor Author

xibz commented May 13, 2024

Cherry pick of #205

@afrittoli
Copy link
Contributor

Must merge after #220 (to enable CI) and #222 (to remove the snake case)

This commit improves consistency in our spec and examples by having all
keys be camel cased.

This made 4 changes:
chain_id -> chainId
context_id -> contextId
link_kind -> linkKind
link_type -> linkType

Signed-off-by: xibz <impactbchang@gmail.com>
xibz added 2 commits May 14, 2024 13:16
Signed-off-by: xibz <impactbchang@gmail.com>
Signed-off-by: xibz <impactbchang@gmail.com>
Signed-off-by: xibz <impactbchang@gmail.com>
@xibz xibz force-pushed the 0.4-json-lint branch 7 times, most recently from c99118c to 3d03925 Compare May 14, 2024 22:50
@@ -28,9 +28,20 @@ jobs:
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: main
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_MARKDOWN: true
VALIDATE_JSON: true
# superlinter runs each linter on a per file bases and does not look
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full explanation on the limitations of superlinter

Signed-off-by: xibz <impactbchang@gmail.com>
@afrittoli
Copy link
Contributor

Thanks for fixing this!
I just noticed that the superlinter logs at the end say:

2024-05-15 01:14:53 [INFO]   ERROR! Failed to call GitHub Status API!
2024-05-15 01:14:53 [INFO]   ERROR:[curl: (22) The requested URL returned error: 403]
2024-05-15 01:14:53 [INFO]   ERROR! Failed to call GitHub Status API!
2024-05-15 01:14:53 [INFO]   ERROR:[curl: (22) The requested URL returned error: 403]
2024-05-15 01:14:53 [NOTICE]   All file(s) linted successfully with no errors detected

I imagine that superlinter is trying to report back something, but failing because of missing authorization.
This is most certainly not new in this PR, just something we may want to fix later on.

Copy link
Contributor

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@afrittoli afrittoli merged commit 0218445 into cdevents:spec-v0.4 May 15, 2024
4 checks passed
@xibz xibz deleted the 0.4-json-lint branch May 15, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants