bikash-barnwal opened a new pull request, #43170:
URL: https://github.com/apache/superset/pull/43170

   ### SUMMARY
   
   `yarn lint:docs-links` fails on `master` with 12 findings, all in the "bare 
relative link" category:
   
   ```
   docs/using-superset/number-formatting.mdx:92  
./creating-your-first-dashboard#dynamic-currency-formatting
   developer_docs/extensions/overview.md:50-60   ./quick-start, ./architecture, 
./dependencies,
                                                 ./contribution-types, 
./development, ./deployment,
                                                 ./mcp, ./security, ./storage, 
./tasks, ./registry
   ```
   
   A link with no extension skips Docusaurus's file resolver: the href is 
emitted as written and the browser resolves it against the current page URL, 
which is the wrong directory for trailing-slash routes. `onBrokenLinks: 
'throw'` cannot catch it, which is why the dedicated linter exists.
   
   This adds the extension each target actually has on disk — `.md` for the 
eleven `developer_docs/extensions/*` pages, `.mdx` for 
`creating-your-first-dashboard` (the anchor is preserved). No link targets or 
link text change.
   
   Because this check runs in the `Docs Testing` workflow, it currently fails 
on every PR that touches a `docs/` path, regardless of what that PR changed.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before:
   
   ```
   $ yarn lint:docs-links
   ✗ lint-docs-links: found 12 broken internal link(s)
   ```
   
   After:
   
   ```
   $ yarn lint:docs-links
   ✓ lint-docs-links: no broken internal links found
   ```
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd docs
   node scripts/lint-docs-links.mjs   # exits 0
   ```
   
   The linter has no dependencies beyond node. Optionally also confirm the 
eleven "Next Steps" links on `developer_docs/extensions/overview.md` and the 
currency-formatting link on `using-superset/number-formatting.mdx` still 
navigate correctly in a docs build.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to