Docs vitepress - #972
Open
kurkle wants to merge 2 commits into
Open
Docs vitepress#972kurkle wants to merge 2 commits into
kurkle wants to merge 2 commits into
Conversation
TypeScript 6 is the newest version the toolchain allows: typedoc 0.28 and @typescript-eslint both stop at <6.1, so 7 has to wait for them. Three things had to move with it. TypeScript 6 no longer includes every @types package automatically, so tsconfig.json now names the two this project relies on. The same change also showed that test/types was only ever green by accident: its target and lib were ES6, and nothing there resolved Object.values until an automatically included @types/node widened the lib set. Its config now matches the root one, and node10 module resolution goes with it, being deprecated in 6 and removed in 7. @typescript-eslint 5 refuses to run on anything past TypeScript 5.2, so it moves to 8, which needs eslint 8.57. Version 8 also promotes no-unused-vars from a warning to an error, which fails the fenced examples in the docs that exist precisely to show a callback signature, so the rule is turned off for markdown code blocks. The emitted declarations are unchanged apart from TypeScript 6 no longer printing the redundant `| undefined` on optional properties; checked by building dist with both versions and diffing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
VuePress 1 is Vue 2 and webpack, and is no longer maintained; this drops about 1350 packages from a fresh install, which is the docs half of chartjs#812. None of the VuePress plugins have a VitePress counterpart, because VitePress has no plugin API at all, so each one is replaced rather than ported: flexsearch by the built-in local search, vuepress-plugin-typedoc by typedoc-vitepress-theme, the redirect plugin by a page under docs/samples, and @simonbrunel/vuepress-plugin-versions by docs/.vitepress/versions.ts, which builds the same menu from the jsDelivr listing at build time instead of refetching it in the browser on every page load. vuepress-theme-chartjs is vendored into docs/.vitepress/theme as Vue 3. The markdown-it rule that turns a ```js chart-editor fence into a component is plain markdown-it and carries over almost unchanged, but the components are Vue 2 and two of their dependencies are Vue 2 only, so they are rewritten: perfect-scrollbar gives way to CSS scrollbar styling, vue-prism-editor (whose Vue 3 release never left alpha) to a textarea over a highlighted layer, and the Font Awesome stylesheet to three inline icons. The palette moves onto VitePress' own custom properties. The site stays light only, as it was -- Chart.js resolves its own tick and grid colours and several samples hard-code them, so a dark page would need the samples taught about the theme first. Reassembling an edited sample joined the blocks with an empty string, which glued a closing brace to the next const: editing any sample with more than one block failed with a SyntaxError, which is every sample but one. They are joined with a newline now. scripts/docs-config.sh writes docs/.vitepress/docs-version.json instead of sed-ing the config in place, so a local build and the dev server work without running it first. Verified against the built site in a browser: every page hydrates with no console errors, all 19 editors draw their chart, editing code redraws it, the action buttons, the Output tab, wheel zoom and the /samples redirect all work. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
Author
|
@etimberg I was thinking something like this could be the way out from vuepress for chart.js. WDYT? |
etimberg
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.