fix: component-name-unique rule should report location
What/Why/How?
What: This sets the location on the reported problem & makes the message one line instead of multiple lines.
Why: The component-name-unique didn't report any location. That location is specifically useful when using the ignore file. The message is more aligned with the other reports.
How: By using passing the location and reporting it instead of just passing the absolutePointer.
Reference
Testing
See updated test code.
Screenshots (optional)
Check yourself
- [ ] Code changed? - Tested with redoc/reference-docs/workflows (internal)
- [x] All new/updated code is covered with tests
- [ ] New package installed? - Tested in different environments (browser/node)
Security
- [ ] Security impact of change has been considered
- [ ] Code follows company security practices and guidelines
🦋 Changeset detected
Latest commit: a774fda6e36efcc4c34edf151c9acd7d131fdcdb
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 2 packages
| Name | Type |
|---|---|
| @redocly/openapi-core | Minor |
| @redocly/cli | Minor |
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
Thank you for the contribution @pboos! I'll take a look into this once I have time.
Also tagging @tatomyr - do we need to update some test snapshots to go with this change?