chore: add type safety to CsvTable and csv data loader#111
Merged
kelsos merged 1 commit intorotki:mainfrom Mar 24, 2026
Merged
Conversation
- Switch CsvTable.vue to TypeScript with type-based defineProps - Type csv-loader.data.ts with defineLoader, exported interfaces, and typed declare for the data export - Add "type": "module" to package.json to enable ESM data loader imports - Exclude *.data.ts from import/no-default-export lint rule
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.
Summary
CsvTable.vueto TypeScript with type-baseddefinePropsand prop destructuringcsv-loader.data.tswithdefineLoaderfrom VitePress, exportedCsvData/CsvDataRecordinterfaces, and typeddeclare const datafor the data export"type": "module"topackage.jsonto enable ESM imports in VitePress data loaders (required fordefineLoader)*.data.tsfromimport/no-default-exportlint rule since VitePress data loaders require default exportsTest plan
pnpm run buildpassespnpm run lintpasses (no new errors)/usage-guides/import-csv,/usage-guides/accounts-and-balances, and/usage-guides/address-book