-
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 <davut2003@hotmail.de>
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 davut2003@hotmail.de Signed-off-by: Davut Kilic <davut2003@hotmail.de>
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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #21687 +/- ##
==========================================
+ Coverage 45.36% 46.24% +0.87%
==========================================
Files 244 250 +6
Lines 13333 14133 +800
Branches 2719 2908 +189
==========================================
+ Hits 6049 6536 +487
- Misses 6983 7250 +267
- Partials 301 347 +46
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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 you@example.com 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.