Thanks for your interest in improving @datocms/content-link! This guide
outlines the setup required to work on the project and the expectations for
pull requests.
-
Install dependencies
npm install
-
Build the TypeScript sources
npm run build
-
Run the test suite
npm run testIntegration tests require a
.env.visual-editingfile (see.env.example) pointing at a preview-enabled DatoCMS project.
npm run test:watch– watch mode for the Vitest suite.npm run lint– ESLint oversrc/andtests/.npm run format/npm run format:check– Prettier helpers.npm run clean– remove compiled output underdist/.
- TypeScript strict mode is enforced – avoid
anyand prefer explicit types. - Keep implementation under
src/; public re-exports live insrc/index.ts. - To add new examples, update the snippets under
examples/and the README. - Regenerate
dist/vianpm run build; never edit compiled files manually.
Before opening a PR:
- Run
npm run lint,npm run format:check, andnpm run test. - Update documentation (
README.md,CHANGELOG.md,examples/) when the public API or integration steps change. - Include screenshots or recordings when UI behaviour (overlays/dev panel) changes visibly.
We use conventional, present-tense commit messages (e.g. add overlay helper).
Large changes are easier to review as multiple focused commits.
Thanks again for contributing!