-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat: add JSON lint check for i18n folder #21687
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Davut Kilic <[email protected]>
16da18d
to
91e11a1
Compare
.github/workflows/json-lint.yml
Outdated
- name: Run JSON lint | ||
run: | | ||
# Alle JSON-Dateien im i18n-Ordner suchen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you write the comment in English?
Signed-off-by: Davut Kilic [email protected] Signed-off-by: Davut Kilic <[email protected]>
9bf55a8
to
1bb871b
Compare
Translated it into English |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can already have this just by introducing a new plugin to es lint. and let the lint take care of this rather than having a new CI workflow for checking json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the below to the .eslintrc.json
{
"files": ["*.html"],
"excludedFiles": ["*inline-template-*.component.html"],
"extends": ["plugin:prettier/recommended"],
"rules": {
"prettier/prettier": ["error", { "parser": "angular" }]
}
},
+ {
+ "files": ["*.json"],
+ "extends": [
+ "plugin:json/recommended-legacy",
+ "plugin:prettier/recommended"
+ ],
+ "rules": {
+ "json/*": ["error"],
+ "prettier/prettier": ["error", { "parser": "angular" }]
+ }
+ }
Hope this helps
Also don't forget: Thanks |
Comprehensive Summary of your change
Added a new GitHub Actions workflow (json-lint.yml) to validate all JSON files in src/portal/src/i18n/.
This ensures any malformed JSON will cause the CI to fail, preventing invalid translations from being merged.
Issue being fixed
Fixes #21685
Checklist
Well Written Title and Summary of the PR
Example: “feat: add JSON lint check for i18n folder”
Label the PR as needed
Choose an appropriate label such as release-note/new-feature or release-note/enhancement.
Accepted the DCO
Make sure all your commits include the Signed-off-by: Your Name [email protected] line.
Tests are passing and test coverage is added if needed
The JSON lint check is run in the new workflow.
Docs impact
No separate docs change needed, since this is an internal CI improvement.