-
Notifications
You must be signed in to change notification settings - Fork 195
fix: resolve problem with severity change for configurable rules #1811
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
Conversation
🦋 Changeset detectedLatest commit: ba53b37 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Coverage report
Show files with reduced coverage 🔻
Test suite run success814 tests passing in 121 suites. Report generated by 🧪jest coverage report action from ba53b37 |
tatomyr
left a comment
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.
Left a few comments.
packages/core/src/utils.ts
Outdated
| if (!obj) return; | ||
| for (const k of Object.keys(obj)) { | ||
| if (!target.hasOwnProperty(k)) continue; | ||
| if (typeof target[k] === 'object' && target[k] !== null && typeof obj[k] === 'string') { |
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 use isPlainObject.
tatomyr
left a comment
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.
LGMT, thanks!
What/Why/How?
Severity of configurable rules could not be overridden without full rule copy:
base.yaml
redocly.yaml
The above did not work.
Reference
Reported by a customer.
Related to https://github.com/Redocly/redocly/issues/12111
Testing
Covered with unit test.
Screenshots (optional)
Check yourself
Security